Lot of thanks to alll for your answers !
I'll now try to make best use of them.
Dominique.
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
On MS Windows, I found WideCharToMultiByte and MultiByteToWideChar,
which take a numerical CodePage as parameter. But I don't know how to
map a charset name ('UTF-8', 'Latin-1', 'ISO-8859-15'...) to a CodePage
(any hint ?).
Hi,
I attached conversion fpc program i had written earlier. Maybe
Op Thu, 7 Dec 2006, schreef Dominique Leducq:
> The changes you made to cwstring is merely to export the iconv API from it. As
> I stated, I already know how to use iconv on Linux/Unix.
Yes, I only gave it as example how I worked around it.
> And I don't necessarily have to deal with widestrin
> On MS Windows, I found WideCharToMultiByte and MultiByteToWideChar,
> which take a numerical CodePage as parameter. But I don't know how to
> map a charset name ('UTF-8', 'Latin-1', 'ISO-8859-15'...) to a CodePage
> (any hint ?).
Iconv exists for windows too. (called iconv.dll) I am using it
So apparently there doesn't exist a portable API on top of this.
There's APR:
http://apr.apache.org/
http://apr.apache.org/docs/apr-iconv/
See fpc\packages\base\httpd\httpd-2.2\apriconv directory.
There are APR DLLs on Windows which you can link with.
HTH
TOndrej
__
Daniël Mantione a écrit :
Op Thu, 7 Dec 2006, schreef Dominique Leducq:
Hello folks,
I need to do some conversion from one character set encoding, given by its
name (e.g. value of encoding attribute in XML header), to another (used
internally, based on locale), and back.
I know of iconv on Li
Op Thu, 7 Dec 2006, schreef Dominique Leducq:
> Hello folks,
>
> I need to do some conversion from one character set encoding, given by its
> name (e.g. value of encoding attribute in XML header), to another (used
> internally, based on locale), and back.
> I know of iconv on Linux/Unix OSes, b
Hello folks,
I need to do some conversion from one character set encoding, given by
its name (e.g. value of encoding attribute in XML header), to another
(used internally, based on locale), and back.
I know of iconv on Linux/Unix OSes, but I would like to do it in a
portable manner, if possibl