Re: character conversion
Tomas By <[email protected]>
| Newsgroups | gmane.comp.gnome.lib.xml.general |
|---|---|
| Message-ID | <[email protected]> |
Hi again, Actually those dump functions from the tree module are probably not what I want, as I do not have the XML tree at that point. (I'd rather not reorganize all my code, as this seems like a fairly simple issue.) I'm looking for something like this int UTF8Toisolat1(unsigned char* out,int* outlen,const unsigned char* in,int * inlen) but CP850 instead of Latin1 Is the whole "encoding" module obsolete, or why do the tree dump functions take a string to specify the encoding? /Tomas On 2017-03-21 14:11, Fred Smith wrote: > 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 > _______________________________________________ > xml mailing list, project page http://xmlsoft.org/ > [email protected] > https://mail.gnome.org/mailman/listinfo/xml