Re: [xml] Query regardin storing of encoding information



On Mon, Apr 14, 2008 at 10:09:51AM +0530, Nagesh wrote:
Daniel, what in the case when the xml document being parsed is in a
different encoding (apart from UTF-8 and UTF-16) and the document does not
contain any internal or external subset, in this case, 
ctxt->encoding is never set.
      Any thoughts?

  We store the encoding of the document as advertized in the
xml declaration in the document encoding itself.

wei:~/XML -> gdb xmllint
GNU gdb Red Hat Linux (6.6-45.fc8rh)
[...]
(gdb) b xmlFreeDoc
Breakpoint 1 at 0x42cafc: file tree.c, line 1175.
(gdb) r --noout test/isolat1
Starting program: /u/veillard/XML/xmllint --noout test/isolat1

Breakpoint 1, xmlFreeDoc (cur=0x725d98) at tree.c:1175
1175    xmlFreeDoc(xmlDocPtr cur) {
(gdb) p cur->encoding
$1 = (const xmlChar *) 0x725ed8 "ISO-8859-1"
(gdb) 

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
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]