Re: [xml] HOW TO Set-up charset encoding...



On Wed, Mar 21, 2007 at 02:29:58PM +0100, Roberto Bonuccelli wrote:
Hi,

I have develop a C process that process spool text file and build xml output file using xml-lib C-binding.
Input files can be in two kind of format:
-utf8 
-cp850 (= ISO-8859)

To write xml file I use in my program:
xmlSaveFormatFileEnc
and I call it in this way:
xmlSaveFormatFileEnc(filename, doc, NULL, 1);

and then xml-lib assume that econding is utf8.
Indeed, I would like to specify "cp850" ecnording charset format or another one too.
Witch C #define I could use? 
Anyone can give me an example?

  Use the new APIs which use the strings and not enums
    http://xmlsoft.org/html/libxml-xmlsave.html#xmlSaveToFilename
then it's a matter of libxml2 or iconv having support for your 
target encoding.

Daniel


-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
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]