GNOME Bugzilla – Bug 104790
encoding and XML through HTTP
Last modified: 2009-08-15 18:40:50 UTC
Hi DV, Again, I'm not sure if this is a bug in xsltproc or a bug in my understanding of XML encoding detection. If I call xsltproc on an XML file served with an HTTP header setting its encoding to iso-8859-1 (such as http://www.w3.org/2002/02/acl-test/text.xml), but with no <?xml?> declaration in it, it stops on any iso-8859-1 encoded character (in the above example, "à"). My understanding of the XML Rec is that the transport layer is authoritative on this matter, so I would think xsltproc should take the charset parameter into account, but I could be wrong. (Note that the problem also appears for an XHTML file served as text/html; charset=iso-8859-1, but this is probably a corner case... I'm not sure how libxslt handles HTTP MIME-Type generally speaking). Sorry if this is wrong
Right, it's a bug. But I won't fix it, first libxml2 internal APIs don't forward the HTTP header all the way up in the stack to the XML parser, and second trusting the HTTP headers is not reliable anyway for stable processing. It's a corner case, a very dangerous one, I don't think I will fix it. Daniel
With the overall big changes for 2.6.0, I decided to cleanup the HTTP/parser interractions and fixed this bug as part of this process, so this should be fixed in CVS RSN, and be available as part of 2.6.0 Daniel
This should be fixed in release libxml2-2.6.0, thanks, Daniel