Re: libxml2 in gnome 1.4
- From: Daniel Veillard <veillard redhat com>
- To: James Henstridge <james daa com au>
- Cc: Daniel Veillard <veillard redhat com>, gnome-hackers gnome org, Miguel de Icaza <miguel ximian com>, peter ximian com
- Subject: Re: libxml2 in gnome 1.4
- Date: Wed, 21 Mar 2001 10:42:03 -0500
On Wed, Mar 21, 2001 at 11:30:34PM +0800, James Henstridge wrote:
> > This version of the XML parser will accept UTF8 and ISO-Latin-1
> > documents only, it will generate only UTF8 output.
>
> What will happen with programs that try to output 8-bit characters in an
> XML file? Will they get mangled in a UTF-8 conversion? I know that using
> 8 bit characters without setting the character set of an XML document is
> not quite valid XML, but libxml1 handles it.
Libxml1 wasn't handling it, it was ignoring it, i.e. the worse approach
possible.
You will get an error that the internal encoding is not UTF8 at saving
time.
> I am just wondering, because there were some problems with the initial
> patches for dia that added libxml2 support because they didn't handle
> character sets (from memory, it was treating it like utf-8 and dropping
> the second highest bit on some characters).
Well, the interface is a bit straightened, the internal tree must be
kept in UTF8. That's the case for libxml2, the encodiing is uniform,
if you modify the tree with non-UTF8 stuff you will get an error when
saving (whether one need to change this and detect it earlier is an
interesting question, it's a performance trade-off ...
Daniel
--
Daniel Veillard | Red Hat Network http://redhat.com/products/network/
veillard redhat com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
_______________________________________________
gnome-hackers mailing list
gnome-hackers gnome org
http://mail.gnome.org/mailman/listinfo/gnome-hackers
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]