Re: [xml] xmlParseDocument with a specified encoding



On Wed, Oct 22, 2003 at 11:34:16AM +0200, Kasimier Buchcik wrote:
Hi,

Is it possible to have a document (as string) in UTF-16 but with an 
other encoding declared in the document prolog, that I can pass to
xmlCreateDocParserCtxt and parse with xmlParseDocument? I.e. can I force 
the parser to handle the document with a specified encoding? Or will the 
parser autodetect somehow the UTF-16 encoding of the passed string and 
don't care for the declaration in the prolog?
Any hints?

  try xmlCtxtReadMemory() and by specifying the encoding, this may work,

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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