I'm currently using an alternate entry point for htmlCreatePushParserCtxt() that takes a string encoding name instead of an xmlCharEncoding enumerator. This is useful when a weird document character encoding is returned in the HTTP headers that libiconv knows about. I attached my patch files in case there is interest in adding an API entry point for this. Patching libxml2-2.5.11 works ok.
Attachment:
HTMLparser.c.patch
Description: Text Data
Attachment:
HTMLparser.h.patch
Description: Text Data
Attachment:
xmlIO.c.patch
Description: Text Data
Attachment:
xmlIO.h.patch
Description: Text Data