Re: [xml] Encoding and Win32

Date view Thread view Subject view Author view

From: Daniel Veillard (Daniel.Veillard@imag.fr)
Date: Wed Jan 31 2001 - 13:15:09 EST


On Wed, Jan 31, 2001 at 05:55:10PM +0100, Philipp Kursawe wrote:
> Hello,
>
> I'm new to libxml and and must say its wonderful clean, fast simple C-API is
> just what I's looking for.
>
> But now I'm running into serious problems when I want to use russian, german
> or chinese text in my XML (not for the tags).
> I don't understand how to convert from the internal used UTF-8 to a Win32
> character set so I can use the texts in native Win32 functions. I'v tried to
> use iconv and enabled iconv support in libxml but the resulting string still
> doesnt look right to me. Is it possible to convert from UTF-8 to 2-Byte
> Windows UNICODE characters, or is there something I've missed?

  there is 2 functions:
    UTF16LEToUTF8() and UTF8ToUTF16LE() in encoding.c which should provide
the converters you need (LE stands for Little Endian used I think on PCs).
The internal structure has to be kept UTF8, simply inport/export to UTF8
when read/write data from the document.
  Concerning the state of iconv on Windows, well the library is supposed
to work but I never tested it...

Daniel

-- 
Daniel Veillard      | Red Hat Network http://redhat.com/products/network/
veillard@redhat.com  | libxml Gnome XML toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
----
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 Jan 31 2001 - 14:46:58 EST