attempt to fix #126211 ... Daniel
* parser.c: attempt to fix #126211 ...
Daniel
diff --git a/parser.c b/parser.c
index 2a47b24..5a97036 100644
--- a/parser.c
+++ b/parser.c
@@ -10386,7 +10386,7 @@
* 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 @@
* plug some encoding conversion routines here.
*/
xmlPushInput(ctxt, pinput);
+ if (enc != XML_CHAR_ENCODING_NONE) {
+ xmlSwitchEncoding(ctxt, enc);
+ }
pinput->filename = NULL;
pinput->line = 1;