Re: FW: [xml] Problem with encoding in libxml.



On Fri, Dec 16, 2005 at 01:07:49PM +0100, Emmanuel wrote:
FWIW, with the implementation of libxml2 into XMLLib (Scripting 
Addition for AppleScript), saving a XML which includes c39f does save 
that same pattern (that on our macs with can read as ASCII "?ü"), not 
a replacement character.

  yes, that's the default behaviour of libxml2, it will save back documents
in the original encoding. But if you save a subtree, you don't save the
encoding declaration, and if the default of Perl (or the bindings) is to
use the users locale (a terrible choice from a maintainance and API
perspective) then the subtree may be output in a different encoding without
the XML declaration to tell this at a subsequent parsing stage leading
to this kind of fatal error. Related docs are at
   http://xmlsoft.org/encoding.html

Daniel

-- 
Daniel Veillard      | Red Hat http://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]