Re: libxml2 in gnome 1.4
- From: Daniel Veillard <veillard redhat com>
- To: ERDI Gergo <cactus cactus rulez org>
- Cc: Daniel Veillard <veillard redhat com>, Darin Adler <darin eazel com>, Miguel de Icaza <miguel ximian com>, Maciej Stachowiak <mjs eazel com>, gnome-hackers gnome org
- Subject: Re: libxml2 in gnome 1.4
- Date: Sat, 24 Mar 2001 03:57:58 -0500
On Sat, Mar 24, 2001 at 01:17:18AM +0100, ERDI Gergo wrote:
> Could we see some solid code please?
> Something _very_ general:
> 1, I have an xmlNodePtr, how do I fill a gchar* with its
> content/the value of one of its properties?
> 2, I have a gchar* that I know nothing about, how do I save it as
> the content/the value of one of the properties of an xmlNodePtr?
>
> I think this would really make the transition easy.
Tell me in what encoding a gchar is. I can tell you that libxml
uses xmlChar for this precise reason, it is an unsigned char (a byte)
and xmlChar * are supposed to be 0 terminated and encoded in UTF8.
(if you run a pedantic parser it will tell you places where C strings
are assigned to xmlChar * and you can check that the cast makes sense).
If you tell me what is the encoding used in a gchar * then doing
the conversions functions back and forth are close to trivial and
I will provide them ! Do you all expect ISO-Latin-1, or is there
different encodings depending on other settings ?
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]