Re: [xml] Character Sets supported

On Fri, Jul 11, 2003 at 04:02:52PM +0200, Peter Jacobi wrote:
Hi Daniel,

In preparing the surgery for iconv-less character encoding support,

  surgery ? I don't see any need for removal.

I want to ask you about some inner workings of libxml2. If you
can remember what's going on there, I can save some exploration:

1. Both xmlGetCharEncodingHandler in encoding.c and 
xmlSwitchEncoding in parserinternals.c have an explicit
switch statement on the predefined encodings, despite the
fact that the later calls the former. Shouldn't it be possible
to eliminate the switch statement in xmlSwitchEncoding?
    Hum, no I don't see how/why !
Note that you cannot remove use of xmlCharEncoding, it is part of the
API ! You may create new API if really needed.

2. I cannot find the place where xmlParseCharEncoding
of encoding.c is overridden for iconv usage or use of
user supplied encoding handlers. Nethertheless, non-
predefined encodings (like ISO-8859-1) are working with
iconv enabled, so there must be a place...

  read xmlParseEncodingDecl()

3. ... or are all uses of xmlParseCharEncoding in error
and should be replaced with xmlFindCharEncodingHandler?

  Not stricto sensus in error but relying on the older code, and 
probably needing some update.


Daniel Veillard      | Red Hat Network
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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