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:

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.
    1/ read the spec
    2/ read libxml doc and API description
  Then try to rephase your question using standard terminology, I can't
make guesses on what you're trying to explain.


Daniel Veillard      | Red Hat Network
veillard redhat com  | libxml Gnome XML XSLT toolkit | Rpmfind RPM search engine

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]