Re: libxml2 in gnome 1.4
- From: James Henstridge <james daa com au>
- To: Daniel Veillard <veillard redhat com>
- Cc: gnome-hackers gnome org, Miguel de Icaza <miguel ximian com>, peter ximian com
- Subject: Re: libxml2 in gnome 1.4
- Date: Thu, 22 Mar 2001 11:57:16 +0800 (WST)
On Wed, 21 Mar 2001, Daniel Veillard wrote:
> On Wed, Mar 21, 2001 at 09:04:04AM -0500, Daniel Veillard wrote:
> > I have put tar and RPMs for people to test the binary compatibility
> > and that it doesn't break things at:
> > ftp://xmlsoft.org/test/
>
> I found a nasty I/O buffer bug, and uploaded a new set, if you are
> having troubles first check that you use the new version:
>
> 172741 Mar 21 13:55 libxml-1.8.12-1.i386.rpm
> 925568 Mar 21 13:54 libxml-1.8.12-1.src.rpm
> 922681 Mar 21 13:53 libxml-1.8.12.tar.gz
> 162128 Mar 21 13:55 libxml-devel-1.8.12-1.i386.rpm
>
> Now this seems to uncover a number of places where people were
> not cautious about the encoding of their data. Remember that with
> this version as for libxml2 all string in the document structure are
> expected to be UTF8 encoded. Making application handle this is actually
> a good first step toward Gnome-2 preparation.
So this 1.x version will cause problems for programs that don't handle
encodings correctly? I am sure there is a fair number of libxml1 programs
that do something like this:
grab text out of GtkEntry (or GtkText, or whatever)
put text in xmlNode as content
save XML file
load XML file
grab content of xmlNode
put text in entry
(which will work great for english, and quite often works for other
locales).
For instance with libxml2, if you ignore encodings and try to output a
string like "ÏÖ" ("\317\326"), it seemed to do a pretty non strict
UTF-8 interpretation and ignore the 6th bit on the second character,
treating it as a single UTF-8 characrter (the PI symbol in this case). So
when XML got loaded again, we get "\317\226" (which is the correct UTF-8
representation for the PI symbol).
Will programs that use libxml1 and not handle character encodings
correctly break like this as well? If so, then this doesn't sound like a
compatible change (even if it keeps the API binary compatible, it is a big
change to the semantics).
This should all get a lot easier with gtk 2.0 and libxml2 :)
James.
--
Email: james daa com au
WWW: http://www.daa.com.au/~james/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]