diff --git a/expat/xmlparse/xmlparse.c b/expat/xmlparse/xmlparse.c index 23fd948b..0c4c6009 100755 --- a/expat/xmlparse/xmlparse.c +++ b/expat/xmlparse/xmlparse.c @@ -316,7 +316,9 @@ XML_Parser XML_ExternalEntityParserCreate(XML_Parser oldParser, return 0; } - processor = externalEntityInitProcessor; + if (errorCode != XML_ERROR_UNKNOWN_ENCODING) + processor = externalEntityInitProcessor; + return parser; }