libxml - encoding

M

Mike

Code :

xmlParserCtxtPtr ctx;

sax_handler.startElement = startElement;
sax_handler.characters = characters;
sax_handler.endElement = endElement;
sax_handler.getEntity = getEntity;

ctx = xmlCreateFileParserCtxt( file);
ctx->sax = &sax_handler;
xmlParseDocument (ctx);
xmlFreeParserCtxt( ctx);

Question :

If encoding input is different to UTF-8 I have read in documentation that
libxml convert into UTF-8 to process input and after reset to input
encoding.

I want an UTF-8 encoding for the output.

How can I say to libxml to keep data in UTF-8 ?

Thanks.

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top