Re: [xml] Encoding - from what to UTF8 ??

Thanks Daniel, I gonna look iconv.
Don't matter, of course I use a serious OS...but not in a red hat flavour ;)


Daniel Veillard wrote:
On Mon, May 23, 2005 at 10:05:50AM +0200, Remy HAREL wrote:

Yet I also use many others source files encoded with many differents encodings :

iso-8859-X ( where X = 1, 2, 5, 6, 14, 15 )
cpXXXX ( can't remember the exact name, but it corresponds to Russian ).

So, my question is "does libxml2 provide functions to convert a source text from one of these languages to UTF8, or there is a simple way to do that ?"

  The answer is no. Libxml2 has hard coded support for UTF-8, UTF-16 and
the iso-8859-x the 2 first ones being the only mandatory encodings an
XML parser must support. For everything else it uses iconv() if found
at compilation time.
  The API you're looking at is iconv:
It's available on all serious OSes, and Igor ships a Win32 precompiled
versions. The set of encoding supported might be platform dependant though
and the quality of the converters may also be system dependant, but that's the API to use. There is a free software implementation:


Remy HAREL          -        Teamlog        |
Linux registered user #224740               |
France Telecom Recherche & Developpement    |
__________________@ @|

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]