Re: Re[2]: [xml] Encoding Problems with libxml 2.2.2

Date view Thread view Subject view Author view

From: Daniel Veillard (Daniel.Veillard@w3.org)
Date: Wed Aug 30 2000 - 06:10:19 EDT


On Wed, Aug 30, 2000 at 11:31:47AM +0200, Stefan Bambach wrote:
> DV> Or EUC-JP if you're japanese or ISO-8859-2 if you're russian, etc ...
> DV> Yes libxml is now consistant independantly of the kind of input.
> I have to store some data from the XML file in MySQL. It's enough to
> store it as 8859-1, because I know that the system is intended for
> germans only :-) So I don't need all features.

  Just to give you an example, I'm french and we are supposed to use
ISO-8859-1, except it lacks the o-e ligature œ character. You're
lucky if all your data can be expressed with ISO-8859-1 :-)

> Yesterday, I used the UTF8toisolat1() function to do the job for me (I
> have to convert each value I read from DOM tree by myself). Is there I
> function like xmlNodeListGetString() with an additional parameter, the
> encoding string, and I get the String as I need it ?

  Hum ... it's not that simple. This would work well with ISO-8859-1
but a lot of character encoders need to maintain a state, which means
that if we fallback to iconv we should try to keep the same encoder
and not open/convert/close for each operation (iconv potentially
ends-up looking for a shared lib and loading it when requesting a new
encoder, this may become very heavy, very fast). So the function should
rather had an xmlCharEncodingHandlerPtr as the second argument.
I will look into this,

Daniel

-- 
Daniel.Veillard@w3.org | W3C, INRIA Rhone-Alpes  | Today's Bookmarks :
Tel : +33 476 615 257  | 655, avenue de l'Europe | Linux XML libxml WWW
Fax : +33 476 615 207  | 38330 Montbonnot FRANCE | Gnome rpm2html rpmfind
 http://www.w3.org/People/all#veillard%40w3.org  | RPM badminton Kaffe
----
Message from the list xml@rpmfind.net
Archived at : http://xmlsoft.org/messages/
to unsubscribe: echo "unsubscribe xml" | mail  majordomo@rpmfind.net


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Wed Aug 30 2000 - 03:43:40 EDT