[fpc-pascal] Set of encoding conversion routines

Marco van de Voort marcov at stack.nl
Tue Aug 11 17:43:04 CEST 2009


In our previous episode, Felipe Monteiro de Carvalho said:
> 
> Does anyone know if there is a set of encoding conversion routines? If
> there isn't, how should we add one? New directory in fpc/packages?

Cross platform, with a library?

The lowest level is unit charset in the rtl, Unix style iconv is supported
by package iconvenc.
 
> I just needed UTF-8 to Latin 1 ISO but I can't find a cross-platform
> solution. Remembering that UTF8ToAnsi doesn't solve the problem
> because it converts to the system encoding and not Latin 1 ISO.
> 
> There do is iconv, but does it already come installed in Windows? I
> couldnt find any iconv.dll or something like that.

No. Non *nix OSes have their own api. There is an abstraction,
lconvencoding, but that is in the LCL afaik.



More information about the fpc-pascal mailing list