Commit e1326114 authored by Daniel Veillard's avatar Daniel Veillard

applied a couple of patches from Mark Itzcovitz to handle saving back

* tree.c: applied a couple of patches from Mark Itzcovitz
  to handle saving back "UTF-16" documents.
Daniel
parent a84c0b30
Thu Jun 5 11:31:02 CEST 2003 Daniel Veillard <daniel@veillard.com>
* tree.c: applied a couple of patches from Mark Itzcovitz
to handle saving back "UTF-16" documents.
Mon Jun 2 21:56:15 MVT 2003 Daniel Veillard <daniel@veillard.com>
* relaxng.c xmlschemas.c include/libxml/schemasInternals.h: commiting
......
......@@ -7865,7 +7865,9 @@ xmlDocDumpFormatMemoryEnc(xmlDocPtr out_doc, xmlChar **doc_txt_ptr,
return;
} else if (doc_charset != XML_CHAR_ENCODING_UTF8) {
conv_hdlr = xmlFindCharEncodingHandler(txt_encoding);
conv_hdlr = xmlGetCharEncodingHandler(doc_charset);
if (conv_hdlr == NULL)
conv_hdlr = xmlFindCharEncodingHandler(txt_encoding);
if ( conv_hdlr == NULL ) {
xmlGenericError(xmlGenericErrorContext,
"%s: %s %s '%s'\n",
......@@ -8050,7 +8052,9 @@ xmlDocFormatDump(FILE *f, xmlDocPtr cur, int format) {
return(-1);
}
if (enc != XML_CHAR_ENCODING_UTF8) {
handler = xmlFindCharEncodingHandler(encoding);
handler = xmlGetCharEncodingHandler(enc);
if (handler == NULL)
handler = xmlFindCharEncodingHandler(encoding);
if (handler == NULL) {
xmlFree((char *) cur->encoding);
cur->encoding = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment