Re: character conversion

Fred Smith <[email protected]>
Newsgroups gmane.comp.gnome.lib.xml.general
Message-ID <CY4PR08MB2711AB3EBAC75C9082D8718AAF3D0@CY4PR08MB2711.namprd08.prod.outlook.com>
You can do it this way, as only one of probably many:

xmlDocDumpFormatMemoryEnc (doc, xmlbufptr, &xmlbufptr_size, "ASCII", 1);

replacing "ASCII" with some other encoding, as you desire.

There are several functions with similar names starting with xmlDocDump...enc, as well as some without the enc, which just dumps the plain UTF8 used internally.

(and it isn't clear to me from reading your posts: you do, I hope, understand that input to libxml must be UTF8 and you get UTF8 out unless you do an encoded output as above.)

Fred Smith
Senior Programmer/Analyst
Computrition, Inc.
175 Middlesex Turnpike
Suite 3C
Bedford, MA

-----Original Message-----
From: xml [mailto:[email protected]] On Behalf Of Tomas By
Sent: Tuesday, March 21, 2017 12:17 AM
To: [email protected]
Subject: [xml] character conversion

Everybody,

Is there a working example somewhere of how to produce output in another code page?

I want to read an XML file and then produce output in CP850.

/Tomas
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/ [email protected] https://mail.gnome.org/mailman/listinfo/xml
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.