diff options
author | Daniel Veillard <veillard@src.gnome.org> | 2008-08-29 19:58:23 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@src.gnome.org> | 2008-08-29 19:58:23 +0000 |
commit | 4cc67bb77eda0a4ced8b477477dc62c8c1096db9 (patch) | |
tree | 1655e6e9e23de6a21a793a63ebef491c38cd4f9d /HTMLparser.c | |
parent | cba68396ac4351a5c4451c483c3343a800d71beb (diff) | |
download | android_external_libxml2-4cc67bb77eda0a4ced8b477477dc62c8c1096db9.tar.gz android_external_libxml2-4cc67bb77eda0a4ced8b477477dc62c8c1096db9.tar.bz2 android_external_libxml2-4cc67bb77eda0a4ced8b477477dc62c8c1096db9.zip |
patch from Robert Schwebel , allows to compile the example if configured
* doc/examples/reader3.c: patch from Robert Schwebel , allows to
compile the example if configured without output support fixes
#545582
* Makefile.am: add testrecurse to the make check tests
* HTMLparser.c: if the parser got a encoding argument it should be
used over what the meta specifies, patch fixing #536346
Daniel
svn path=/trunk/; revision=3785
Diffstat (limited to 'HTMLparser.c')
-rw-r--r-- | HTMLparser.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/HTMLparser.c b/HTMLparser.c index a16faf63..57e64df0 100644 --- a/HTMLparser.c +++ b/HTMLparser.c @@ -5973,8 +5973,12 @@ htmlDoRead(htmlParserCtxtPtr ctxt, const char *URL, const char *encoding, xmlCharEncodingHandlerPtr hdlr; hdlr = xmlFindCharEncodingHandler(encoding); - if (hdlr != NULL) + if (hdlr != NULL) { xmlSwitchToEncoding(ctxt, hdlr); + if (ctxt->input->encoding != NULL) + xmlFree((xmlChar *) ctxt->input->encoding); + ctxt->input->encoding = xmlStrdup((xmlChar *)encoding); + } } if ((URL != NULL) && (ctxt->input != NULL) && (ctxt->input->filename == NULL)) |