Re: [xml] libxml2, howto force encoding



On Sun, 2003-03-23 at 05:33, Matthias Knöfel wrote:
Is there a possibility to force a special encoding while parsing a xml file?
I have to parse files with apparently false encoding declaration :(
They are declared as <?xml version="1.0" encoding="UTF-8"?> but includes
characters from the iso-8859-1 charset. So the xmlParseFile() function
will abort of course. Any ideas to parse these files without modification
of the xml-files?


So are you saying you're stuck with files that are not valid XML
(because their encoding declaration is incorrect) and you still want to
be able to deal with them using libxml?

Cheers,
John
-- 
John Fleck
jfleck inkstain net (h) jfleck abqjournal com (w)
http://www.inkstain.net http://www.abqjournal.com
http://www.gnome.org/learn/users-guide/latest/

"Sliced bread wasn't an innovation. Sliced pizza was. I mean, can you
 imagine eating a family sized unsliced pizza?"
 - Jeff Waugh




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