hi
im generating a mimemess object
i have an attachment which name is in hebrew
the result of the encoding is: FileName="=?UTF-8?Q?=F0=E9=F1=E9=E5=EF.txt?="
for some reason, when i get back the email (i sent it to myself)
the following happens, according to the debug:
in InlineDecode function of mimeinln, i have the following code:
if c = 'B' then
begin
s := DecodeBase64(su);
<-----------------------------------------------------
s := CharsetConversion(s, ichar, CP);
end;
if c = 'Q' then
begin
s := '';
for n := 1 to Length(su) do
if su[n] = '_' then
s := s + ' '
else
s := s + su[n];
s := DecodeQuotedPrintable(s);
<----------------------------------------------
s := CharsetConversion(s, ichar, CP);
end;
the 's' variable after the marked line above (in both cases of c = 'B' and c =
'Q')
is the correct name of the attachment in hebrew!
but after the next line is executed, the 's' variable contains garbage
the call to the above is done from DecodePartHeader procedure of mimepart
the call itself is like this: FFileName := InlineDecode(FFileName,
FTargetCharset);
so 's' after the marked line returns the correct name, but then it tries to
convert it from utf_8 (see 3rd line above)
to cp1255 charset, but the name is already in cp1255 charset so the result is
gibberish.
i had another sample when c = 'B' and the same happens
after the marked line, 's' got the correct name, but then the next line made it
gibberish
ofcourse when the attachment is in english, i dont have any problem
what am i missing?
thanks for the help-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
synalist-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synalist-public