Commit 43caefb3 authored by Daniel Veillard's avatar Daniel Veillard
Browse files

attempt to fix #126211 ... Daniel

* parser.c: attempt to fix #126211 ...
Daniel
parent ffa7b7e2
Sun Dec 7 20:30:53 CET 2003 Daniel Veillard <daniel@veillard.com>
* parser.c: attempt to fix #126211 ...
Fri Dec 5 17:07:29 CET 2003 Daniel Veillard <daniel@veillard.com>
 
* pattern.c xmlreader.c xmllint.c include/libxml/pattern.h
......
......@@ -10386,7 +10386,7 @@ xmlIOParseDTD(xmlSAXHandlerPtr sax, xmlParserInputBufferPtr input,
* generate a parser input from the I/O handler
*/
pinput = xmlNewIOInputStream(ctxt, input, enc);
pinput = xmlNewIOInputStream(ctxt, input, XML_CHAR_ENCODING_NONE);
if (pinput == NULL) {
if (sax != NULL) ctxt->sax = NULL;
xmlFreeParserCtxt(ctxt);
......@@ -10397,6 +10397,9 @@ xmlIOParseDTD(xmlSAXHandlerPtr sax, xmlParserInputBufferPtr input,
* plug some encoding conversion routines here.
*/
xmlPushInput(ctxt, pinput);
if (enc != XML_CHAR_ENCODING_NONE) {
xmlSwitchEncoding(ctxt, enc);
}
pinput->filename = NULL;
pinput->line = 1;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment