[fpc-pascal] charset conversion

Daniël Mantione daniel.mantione at freepascal.org
Thu Dec 7 14:31:20 CET 2006

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, but I would like to do it in a portable
> manner, if possible.
> Do you know an existing solution ?
> I saw there is a 'charset' unit in the RTL of FPC, but it is not documented,
> ant it is not yet very clear to me how to use it or even if it does what I
> need...

For the website generation, I use a tweaked cwstring widestring manager, 
see http://svn.freepascal.org/svn/html/adp2html.pp. For a more structural 
and portable approach, the functionality to specify encodings needs to be 
integrated into the widestringmanager.


More information about the fpc-pascal mailing list