Re: [xml] wide characters & xmlDocDumpFormatMemory
- From: Daniel Veillard <veillard redhat com>
- To: David Harris <xml gnome davidharris me uk>
- Cc: xml gnome org
- Subject: Re: [xml] wide characters & xmlDocDumpFormatMemory
- Date: Fri, 4 Feb 2005 06:14:27 -0500
On Fri, Feb 04, 2005 at 06:04:00AM -0500, Daniel Veillard wrote:
On Fri, Feb 04, 2005 at 10:47:24AM +0000, David Harris wrote:
xmlDocDumpFormatMemory works fine in xmlbuff is coerced to char but not
wchar_t. How can I use wide characters? are there wide character versions of
these functions? I certainly couldnt find them or any clue about using utf8
input for this library.
You need to read more about the subject
http://www.w3.org/TR/REC-xml/#sec-guessing
if you use XML, you'd better read the associated spec. It does *not* have to
show up at the API level. There is also specific doc about encoding in
libxml2
http://xmlsoft.org/xmlmem.html
it' 2 clicks away from the main page http://xmlsoft.org/
Wrong link, the encoding explanations are actually
http://xmlsoft.org/encoding.html
which is directly listed as "Encodings support" on the main page.
Also "wide character" does not mean much is that UTF-16, UC2, UCS4, direct
Unicode code points ? An encoding means something it actually explicitely
tell that it means a specific code conversion to Unicode code points
and back (when possible). wchar_t does not say what is the integer content
nor even it's size which is left platform/compiler dependant, i.e. unusable
as a base for real technical discussion without more informations you did
not provide.
Character sets, encodings, Unicode, are hard concepts, but absolutely
needed if you really want to do internationalization properly. XML defined the
framework clearly, and you need to understand it (especially Appendix F) to
not make mistakes in an XML processing chain.
Daniel
--
Daniel Veillard | Red Hat Desktop team http://redhat.com/
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]