HTML push parser encoding parameter is overriden
Since commit ec7be506, the encoding parameter of htmlCreatePushParserCtxt
is overriden in the first call to htmlCurrentChar
when the html document doesn't explicitly sets its charset. Before this commit, the encoding was set in ctxt->charset
and was used. Now XML_INPUT_HAS_ENCODING
is not set when htmlCurrentChar
is called, and in this case htmlFindEncoding
return NULL and ISO8859-1 is used.
Adding a call to xmlSwitchEncoding(ctxt, enc)
in htmlCreatePushParserCtxt
fixes the issue.