Re: [xml] libxml2 and Unicode



On Mon, Oct 08, 2001 at 07:51:26PM +0200, Andreas Roth wrote:
1.) I'm looking for a patch for the Interface of the libxml2 functions. For
example xmlSaveFormatFile is defined as the following:

int xmlSaveFormatFile(const char *filename, xmlDocPtr cur, int format);

I need an additional function like

int xmlSaveFormatFileW(const wchar_t *filename, xmlDocPtr cur, int format);

Note: I know, that there's a way of converting Unicode to ANSI filenames,
but this is not perfect on a international system (Think of a japanese or
chinese system)

  If you don't like the defaults I/O interface, override with your own:
    http://xmlsoft.org/xmlio.html

2.) What happen, if i create a ANSI XML File using libxml2. Than i use

  What is an ANSI XML File ? Never heard of this ?

another program, compiled for using the Unicode charset, and call
xmlSetProp(node,(xmlChar*)unicode_name,(xmlChar*)unicode_value); After that
i call xmlSaveFile, but what happen's with the XML File ? Have i to convert
my Parameters for libxml2 to the charset of the XML File ?

  You seems horribly confused mixing properties of the filename name and the
content of the file. Or I just can't understand your question.

3.) Are the any examples, using Unicode in a program and using libxml2 with
ANSI XML Files ?

  Where on earth did you see "ANSI XML" defined ?
libxml will parse any XML file in one of the encodings whose support is
mandatory per the XML spec. Whether it comes from a file, a pipe or an
in-memory buffer.
  Please:
    1/ read the spec
       http://www.w3.org/TR/REC-xml
    2/ read libxml doc and API description
       http://xmlsoft.org/
       http://xmlsoft.org/html/libxml-lib.html
 
  Then try to rephase your question using standard terminology, I can't
make guesses on what you're trying to explain.

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]