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:"Remy Lebeau (TeamB)" (no.spam@no.spam.com)
Date:Mon, 26 Nov 2007 15:38:42

"Richard" <ritchie872@yahoo.com> wrote in message
news:474b4be7$1@newsgroups.borland.com...

> Well, my code is (rawly) the following (SMTP is TidFTP and Mess is
> TidMessage)

That is not what I meant.  I wanted to see the raw email data that
TIdMessage generates, not the code that sets it up.

> The subject OTOH looks rawly like:
>
> ?utf-8?B?w5HCi8OQwrLDkMK6w5HCi8OQwrA=?=

That is perfectly normal and valid.

> so it SEEMS like it has been base64 encoded, BUT, if I first base64
> decode it and then I  UTF8Decode I don't get my original widestring......

You did not show what your original string was to begin with.  For the
output to be different, Indy would have had to receive different input in
the first place.

> So that's why I was wondering if maybe the headers get UTF8
> encoded automatically or something....

You never said which version of Indy you are actually using.  Older versions
did not support UTF-8 at all.  Recent snapshots of Indy 10 do, and will
automatically encode Ansi and MBCS strings.


Gambit

Replies:

In response to:

www.cryer.info
Managed Newsgroup Archive