1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-14 20:01:04 +03:00

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
This commit is contained in:
Daniel Veillard
2008-08-29 19:58:23 +00:00
parent cba68396ac
commit 4cc67bb77e
4 changed files with 20 additions and 5 deletions

View File

@ -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))