Re: my worry about the recent libxml change
- From: Daniel Veillard <veillard redhat com>
- To: Vlad Harchev <hvv hippo ru>
- Cc: Darin Adler <darin eazel com>, Gnome Hackers <gnome-hackers gnome org>
- Subject: Re: my worry about the recent libxml change
- Date: Fri, 23 Mar 2001 15:31:12 -0500
On Fri, Mar 23, 2001 at 02:09:03PM +0400, Vlad Harchev wrote:
> On Thu, 22 Mar 2001, Darin Adler wrote:
> Here is what I propose:
> * DOM tree should use locale's encoding in memory. When we switch to gtk-2.0,
> this will automatically mean that tree will be in utf8 format.
Irrealistic with libxml, libxml-1.8.12 and libxml2 both use UTF8
for the internal representation in memory. Libxml has not idea
of a locale, it's an XML app not a GUI one.
> * When saving xml files, locale's charset name should be saved in xml header.
Libxml1 can't do this, this is doable with libxml2 but the internal
tree content will be in UTF8 anyway.
> When loading files:
> 1) If xml file has charset name in header, convert from that charset to
> locale's charset
> 2) If xml file doesn't have charset name in header, try to interpret each
> string as if it was in utf8 - if the string is malformed utf8 string, treat
> as if string was in locale's charset, if the string is really well-formed utf8
> string, convert it from utf8 to locale's charset.
No upon loading everything will be converted to UTF8, you have a single
representation independant of the charset or locale.
> Of course we can change behaviour of libxml depening on some global variable
No you can't, it won't do it. There is no support for it.
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/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]