Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Nov : Re: Sending a SMTP message with UTF-8 subject

www.cryer.info
Managed Newsgroup Archive

Re: Sending a SMTP message with UTF-8 subject

Subject:Re: Sending a SMTP message with UTF-8 subject
Posted by:"Richard" (ritchie8..@yahoo.com)
Date:Tue, 27 Nov 2007 20:02:41

"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message
news:474c6049@newsgroups.borland.com...
> > Then please provide a concrete, compilable example that does not work
> correctly.

Uhh????

Mess.Subject = 'some wide string with 3 code pages';   or
Mess.Subject:= UTF8Encode('some wide string with 3 code pages');

None of those give the desired result. The first one gives uss the subject
'?????? ???????? some string' (when the only legible string is the one with
the own system codepage. That isthe normal conversion from Wide to Ansi.

The second case will give us some wrongly =?utf8?B? encoded subject  (double
encoded?) It seems like passing a UTF8 string to the subject will
causeifMessage to encode to multibyte just again, given an incorrect result.

>
> That will not work. TIdMessage will simply overwrite that value with the
> current one from the Subject property.

Yes, I noted that..

>> I'll take a look to TidMessage's code to see if I can disable
>> the autoencoding of the ´headers without affecting the rest

You mean, hardcoded in binary??????? Because there must be *somewhere* in
the code some place where this encoding takes place.

Replies:

In response to:

www.cryer.info
Managed Newsgroup Archive