Re: [xml] html push parser and libiconv



On Fri, 2003-09-26 at 04:40, Daniel Veillard wrote:
On Fri, Sep 26, 2003 at 03:38:03AM -0400, Chris Anderson wrote:
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.

  Okay, but I expect to provide the same kind of htmlRead... APIs
as provided for the XML parser for the HTML parser and those include
encoding as a const char * . As discussed a few weeks ago on the list
I'm trying to get rid as much as possible of the xmlCharEncoding type
which is too limited and for no good reason.
  The patch might help those stuck with 2.5.11, thanks but from 2.6.0
I expect a better alternative API.

Yeah, it is by no means an elegant solution, more like a quick and dirty
approach for my particular needs.

<elsewhere>

I though people had troubles with the fact that they received strings
of characters, not because they receive the error synchronously !

This is true...

if (strncmp(msg, "xmlParserInputBufferPush: encoder error", 39) == 0)
  p->genericStatus = XML_ERR_UNSUPPORTED_ENCODING





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]