[xslt] how to set input encoding during tree generation



Hello everyone,

I'm writing a program to convert from a
proprietary file format into xml. I read
and parse the original data in memory and
build a new xml document by feeding it
char data from the original. Unfortunaty
the original data is encoded in 'MACINTOSH'-
encoding. Somehow i can't seem to find documentation
on how to set the correct input encoding so that
something like this works:

 ...
 tmp = strndup(mark, cur - mark);
 xmlNewTextChild(tree, NULL, "span", tmp);
 free(tmp);
 mark = ++cur;
 ...

where tmp is a copy of the (mac-encoded) original data.
Did i miss an existing API function or do i simply have
to use iconv myself on the input data?
Any hints or pointers to further documentation would
be highly appreciated.

 Thank's in advance

   Ralf Mattes




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