Re: [xml] French character encoding problem

On Thu, Sep 15, 2005 at 12:17:34PM -0400, Fred Fung wrote:
We are using libxml version 2.0.0 on Red Hat Linux Enterprise version 2.4.9.
I have an xml file with the first line specifying the encoding scheme :
         <?xml version="1.0" encoding="LATIN1" ?>

  Uing "LATIN1" is a very bad idea, it is absolutely not portable
  encoding="ISO-8859-1" is the right way.

and one of the text node in the file is the following :

  Horror, uppercase tags !

After the document has been parsed via xmlParseFile( ) and xmlDocGetRootElement( ), a call to 
xmlNodeGetContent( ) returns "FRANÃîOIS" (a strlen of 9) instead of "FRANÃOIS".
Am I missing something in the C program to convert the encoded sequence to the origianl character ?

  Read the doc:


Daniel Veillard      | Red Hat Desktop team
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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