mirror of
https://github.com/GNOME/libxml2.git
synced 2025-03-19 18:50:25 +08:00
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
This commit is contained in:
parent
a84c0b30c4
commit
e13261148b
@ -1,3 +1,8 @@
|
||||
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
|
||||
|
8
tree.c
8
tree.c
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user