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


Daniel Veillard      | Red Hat
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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