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:
@ -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))
|
||||
|
Reference in New Issue
Block a user