1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-20 03:52:25 +03:00

fixed some htmlSetMetaEncoding() problems fixup and integrated tests for

* HTMLtree.c: fixed some htmlSetMetaEncoding() problems
* python/libxml.c python/tests/Makefile.am python/tests/serialize.py:
  fixup and integrated tests for the serialization stuff
Daniel
This commit is contained in:
Daniel Veillard
2002-03-06 21:39:42 +00:00
parent e915b2d423
commit 4e0e297468
5 changed files with 165 additions and 10 deletions

View File

@@ -1491,8 +1491,9 @@ libxml_serializeNode(PyObject *self, PyObject *args) {
xmlCharEncodingHandlerPtr handler = NULL;
doc = (xmlDocPtr) node;
if (encoding == NULL)
encoding = (xmlChar *) htmlGetMetaEncoding(doc);
if (encoding != NULL)
htmlSetMetaEncoding(doc, encoding);
encoding = (xmlChar *) htmlGetMetaEncoding(doc);
if (encoding != NULL) {
handler = xmlFindCharEncodingHandler(encoding);
@@ -1564,6 +1565,9 @@ libxml_serializeNode(PyObject *self, PyObject *args) {
xmlOutputBufferPtr buf;
xmlCharEncodingHandlerPtr handler = NULL;
if (encoding != NULL)
htmlSetMetaEncoding(doc, encoding);
encoding = (xmlChar *) htmlGetMetaEncoding(doc);
if (encoding != NULL) {
handler = xmlFindCharEncodingHandler(encoding);
if (handler == NULL) {