Re: [xml] How do I read German Umlaute - entities from an XML-File using libxml?

On Fri, Oct 05, 2001 at 02:52:46PM +0200, Matthias Peters wrote:
The XML-Files that I generate contain German Umlaute (äöü  or ä ö 
I use a Function to convert them into a sequence like this:
ä ----> ä
ö ----> ö
and so on...
Now the Internet Explorer can read the XML-Files and display all the 
Umlaute correctly. However libXMLs "characters" call-back function does not 
convert the Umlaute the right way back. For instance "&#xe4" becomes "ä". 
Can anyone tell me, how to solve this problem? (Perhaps by a sample program 
that uses Umlaut-conversion?)

  First, read the documentation !!!

  The libxml callback gives UTF8 encoded strings. It seems taht you expect
ISO-8859-1 encoded ones. You need to convert between both. There is a routine
called isolat1ToUTF8, use it or change you program to use UTF8 encoding.


Daniel Veillard      | Red Hat Network
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]