thank you for your reply, in short, i want to force synapse to encode both 
subject and sender name as
UTF8, what i do is (im using D2009, unicode):

Msg2.Header.Subject := HandleProp(txtSubject.Text);

the above value is sent to the following function:
    function HandleProp(Value: string): string;
    begin
      SubStrm.Clear;
      tmp.Text := Value; <--------the subject in hebrew
      tmp.SaveToStream(SubStrm,TEncoding.UTF8);
      SubStrm.Position := 0;
      Result := Trim(SubStrm.DataString);
    end;

the content of the above is utf8 characters (weird "unreadable" characters)
then im calling msg2.encodeMessage;
which calls to: function InlineCodeEx(const Value: string; FromCP: TMimeChar): 
string;
if NeedInline(Value) then <--- returns true
c := IdealCharsetCoding(Value, FromCP, IdealCharsets); <-- returns iso_8859-8 
(hebrew)
but i want to use UTF8, i dont want it to convert the value to hebrew
the next line is: Result := InlineEncode(Value, FromCP, c);
the result of the above is:
=?ISO_8859-8?Q?<subject in hebrew characters>?=
while i want it to be
=?UTF_8?Q?<subject in utf8>?=

the above is invalid according to gmail's forum, when i asked why IMAP couldnt 
read it correctly.
it seems the above subject fails when passing the 7bit so i get "????" in imap 
gmail when fetching the headers.

thanks

--
On 30/01/2010 23:45:02, Lukas Gebauer wrote:
>> it seems that gmail has a problem with the following header: Subject:
>> =?ISO-8859-8?Q?__?= )it's an hebrew subject).

>In Quoted-printable cannot be any non-7bit chars. However your
>subject contains these chars. Right?

>How you are create this subject? It seems to be encoded badly. And it
>can be core of your problems.


>--
>Lukas Gebauer.

>http://synapse.ararat.cz/ - Synapse Delphi and Kylix TCP/IP Library
>http://geoget.ararat.cz/ - Geocaching solution



>------------------------------------------------------------------------------
>The Planet: dedicated and managed hosting, cloud storage, colocation
>Stay online with enterprise data centers and the best network in the
>business Choose flexible plans and management services without
>long-term contracts Personal 24x7 support from experience hosting
>pros just a phone call away. http://p.sf.net/sfu/theplanet-com
>_______________________________________________
>synalist-public mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/synalist-public
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
synalist-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synalist-public

Reply via email to