i dont think this is the case. according to my tests it is more than
obvious that iconv.dll affects "CharsetConversion" function. the UTF8
result was different with and without iconv.dll meaning utf8tostring
converted a cut off string to begin with.

someone here said that he doesnt have this problem but i couldnt find his
reply in synapse forum (archive) so i couldnt find his email and ask him
how he did things.


Original Message:
-----------------
From: Kerkmann, Thomas [email protected]
Date: Tue, 2 Jun 2009 08:46:44 +0200
To: [email protected]
Subject: Re: [Synalist] iconv.dll cuts 2 first characters - continue


Hi all,

Could it be an idea to think that UTF8ToString cuts off two bytes because
it "assumes" them to be the BOM ? 

-----Ursprüngliche Nachricht-----
Von: amos [mailto:[email protected]] 
Gesendet: Montag, 1. Juni 2009 22:03
An: Ararat Synapse
Betreff: [Synalist] iconv.dll cuts 2 first characters - continue

hi

im now using the newer dll but it seems i still have a problem. i made some
more tests to try to understand better the problem and here are my
conclusion:
http://www.yousendit.com/download/MnFpTG0zT2IwVW1Ga1E9PQ
in the above link u can find a zip file with 2 files: headers.txt that
contains the problematic headers (subject is the relevant one here). notice
that the subject (which is in hebrew this time) has a B indication and not
Q, i think it has a relation to the problem.

using the debug i got to this point: InlineDecode function in MimeInln.pas
unit:
      if c = 'B' then
      begin
        s := DecodeBase64(su);  <----- the result is the correct sentence
in hebrew!!!
        s := CharsetConversion(s, ichar, CP); <--- here i convert it to
UTF8*
      end;

when converting back using: aSubject := UTF8ToString(msg.Header.Subject)
then the 2 characters are cut off!
the above is correct only when i have iconv.dll in the same folder as the
exe file, if i rename/delete the file, everything is back to normal. 

* i checked the UTF8 conversion with and without the file and i did see a
difference:
with the file i got the following:
׳×׳•׳¦׳'#$90'׳•׳× ׳”׳’׳¨׳'#$9C'׳×
׳'#$9E'׳ ׳•׳™׳™ ׳₪׳™ without the file i got the
following, as u can see, the following string is longer
'׳×׳•׳¦׳'#$90'׳•׳× ׳”׳’׳¨׳'#$9C'׳×
׳'#$9E'׳ ׳•׳™׳™ ׳₪׳™׳¡'

the line before converting to UTF8 results with the correct string so the
conclusion is that iconv.dll does affect CharsetConversion function and
causes it to cut off 2 bytes (characters) but i dont know why. i hope the
headers sample + file im using may be helpful.

thanks

-- 
----------------------------------------------------------------------------
--
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
synalist-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synalist-public


--------------------------------------------------------------------
myhosting.com - Premium Microsoft® Windows® and Linux web and application
hosting - http://link.myhosting.com/myhosting



------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
synalist-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synalist-public

Reply via email to