On 14-09-2022 13:32, Petr Kolář wrote:
I‘ve founded, that iconv.dll failed on a 64 bit system.
It raised exception $C0000005 access violation.
It works fine on 32 bit.
I have a iconv.dll from tesseract 64 bit.
That one goes one step further.
But it seems to hang for about 30 seconds in the second pass
(after successful conversion to UCS-2 in conversion to UTF-8).
It's a much older (2013) and smaller version.
Also note that //IGNORE isn't supported by newer versions of iconv.
And CharsetConversion uses //IGNORE by default (that's the primary
reason for the AV).
You could try it manually like this:
// CharsetConversion('Test', CP1250, UTF_8);
uses synaicnv
cd := SynaIconvOpen('UTF-8', 'WINDOWS-1250');
rs := SynaIconv(cd, 'Test', Outstr);
SynaIconvClose(cd);
It works partly. Only the length of the string isn't correct (and the
result of iconv is -1). I think there is something wrong with the call
_iconv() itself in synaicnv.pas in WIN64.
It also states this in synaicnv.pas:
// Content: ICONV support for Win32, OS/2, Linux and .NET
So I guess Win64 isn't supported yet.
It is possible to create your own calls to iconv.dll (I tried) but
you'll need to know the exact parameter structure (and that's where it
goes wrong in synaicnv.pas).
Grtz,
Rik
_______________________________________________
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public