>         htmlPart := Msg2.AddPart(MimePart);
>         HTMLContent := TTntStringList.Create; (unicode support string
>         list) try
>           HTMLContent.Text := tmp; (tmp is widestring)
>           htmlContent.SaveToStream(htmlPart.DecodedLines);
>           htmlPart.Primary := 'text';
>           htmlPart.Secondary := 'html';
>           htmlPart.Description := 'HTML text';
>           htmlPart.Disposition := 'inline';
>           htmlPart.CharsetCode := UTF_8;
>           htmlPart.EncodingCode := ME_QUOTED_PRINTABLE;
>           htmlPart.EncodePart;
>           htmlPart.EncodePartHeader;
>         finally
>           HTMLContent.Free;
>         end;
> after EncodePart, the result is 1 character 
> and it seems that 1 of the first characters when loading the stream is #0
> which is null so the decoding ends in the beginning what am i missing?

No, you forgot to set charset encoding used in DecodedLines stream. 
Synapse asumes system codepage as default, and it is wrong encoding in 
your case. It is probably UCS_2. So, set (before EncodePart, of course!):

htmlpart.TargetCharset := UCS_2;

(or maybe UCS_2LE, I not know byte ordering of your used unicode 
components...)

--
Lukas Gebauer.

E-mail: [EMAIL PROTECTED]
WEB: http://www.ararat.cz/synapse - Synapse Delphi and Kylix TCP/IP 
Library



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
synalist-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synalist-public

Reply via email to