scrambled characters of charset.cpp

Use this forum if you want to discuss a problem or ask a question related to a hMailServer beta release.
Post Reply
lalaice
New user
New user
Posts: 2
Joined: 2008-04-07 14:33

scrambled characters of charset.cpp

Post by lalaice » 2008-04-07 14:46

Hi Martin
I'm an Asian user. I like the hMailserver very much and easy to use.
But I met across some bugs, when it is compiled in VS 2005.

There r scrambled characters in the charset.cpp. And I don't know the original source code.
So could u past the full charset.cpp again on the forum? Then I can copy it into the file and debug it.

the file location : hMailServer-4.4.2-B275\source\Common\Util\Charset.cpp

the scrambled source code:

"
std::vector<String> setNeedsEncoding;
setNeedsEncoding.push_back("=?iso-8859-1?q?this is some text?=");
setNeedsEncoding.push_back("邃?);
setNeedsEncoding.push_back("拍?);

setDoesNotNeedEncoding.push_back("Re: =?ISO-8859-1?Q?Reuni=E3o?= =?ISO-8859-1?Q?Reuni=E3o?=諥BCD =?ISO-8859-1?Q?Reuni=E3o?= ABCD"); "

thx.

Kaan1983
Senior user
Senior user
Posts: 595
Joined: 2007-01-30 16:26
Location: TÜRKIYE

Re: scrambled characters of charset.cpp

Post by Kaan1983 » 2008-04-07 14:54

Hello lalaice;

hMailServer Version 5 has unicode support. (Just in case) You may want to try the latest alpha or wait for the release.
However V5 won't have open source code.

User avatar
dzekas
Senior user
Senior user
Posts: 2486
Joined: 2005-10-13 21:28
Location: Lithuania

Re: scrambled characters of charset.cpp

Post by dzekas » 2008-04-07 15:20

lalaice wrote:Hi Martin
I'm an Asian user. I like the hMailserver very much and easy to use.
But I met across some bugs, when it is compiled in VS 2005.

There r scrambled characters in the charset.cpp. And I don't know the original source code.
So could u past the full charset.cpp again on the forum? Then I can copy it into the file and debug it.

the file location : hMailServer-4.4.2-B275\source\Common\Util\Charset.cpp

the scrambled source code:
It is not scrambled. It is in iso-8859-1. Your editor or project or compiler uses different charset.

----
std::vector<String> setNeedsEncoding;
setNeedsEncoding.push_back("=?iso-8859-1?q?this is some text?=");
setNeedsEncoding.push_back("åäö");
setNeedsEncoding.push_back("ÅÄÖ");
setDoesNotNeedEncoding.push_back("Re: =?ISO-8859-1?Q?Reuni=E3o?= =?ISO-8859-1?Q?Reuni=E3o?=ÖABCD =?ISO-8859-1?Q?Reuni=E3o?= ABCD");
----

lalaice
New user
New user
Posts: 2
Joined: 2008-04-07 14:33

Re: scrambled characters of charset.cpp

Post by lalaice » 2008-04-08 01:10

dzekas wrote:
lalaice wrote:Hi Martin
I'm an Asian user. I like the hMailserver very much and easy to use.
But I met across some bugs, when it is compiled in VS 2005.

There r scrambled characters in the charset.cpp. And I don't know the original source code.
So could u past the full charset.cpp again on the forum? Then I can copy it into the file and debug it.

the file location : hMailServer-4.4.2-B275\source\Common\Util\Charset.cpp

the scrambled source code:
It is not scrambled. It is in iso-8859-1. Your editor or project or compiler uses different charset.

----
std::vector<String> setNeedsEncoding;
setNeedsEncoding.push_back("=?iso-8859-1?q?this is some text?=");
setNeedsEncoding.push_back("åäö");
setNeedsEncoding.push_back("ÅÄÖ");
setDoesNotNeedEncoding.push_back("Re: =?ISO-8859-1?Q?Reuni=E3o?= =?ISO-8859-1?Q?Reuni=E3o?=ÖABCD =?ISO-8859-1?Q?Reuni=E3o?= ABCD");
----
THX Kaan1983,dzekas for ur help
I'll try it again.
But did u know how to reset the unicode in VS 2005?

User avatar
martin
Developer
Developer
Posts: 6834
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Re: scrambled characters of charset.cpp

Post by martin » 2008-04-08 19:08

There r scrambled characters in the charset.cpp
What do you mean by 'scrambled' to start with? What problem does it give you? The lines you've quoted is only used for automated tests. You can remove the lines and the server will still work fine after compilation.
But did u know how to reset the unicode in VS 2005?
And what do you mean by this? :) hMailServer 4.x does not support unicode. There's no simple flag/switch you can enable to enable Unicode support. In version 5, unicode support has been implemented but this is a huge change which affects all parts of the source code.

User avatar
dzekas
Senior user
Senior user
Posts: 2486
Joined: 2005-10-13 21:28
Location: Lithuania

Re: scrambled characters of charset.cpp

Post by dzekas » 2008-04-08 21:18

martin wrote:
There r scrambled characters in the charset.cpp
What do you mean by 'scrambled' to start with? What problem does it give you? The lines you've quoted is only used for automated tests. You can remove the lines and the server will still work fine after compilation.
charset.cpp has lines with iso-8859-1 8bit symbols. He sees those lines in Chinese gb2312 charset.

åäö is 0xE5 0xE4 0xF6 in ISO8859-1

邃 is 0xE5 0xE4 in GB2313. Question mark is for unrecognized symbol, because 0xF6 alone can't represent any symbol in gb2312. It needs second byte.

Post Reply