Tim,

yes this sounds good. 

One could simply register an "encoding handler" which would 1) do the
job needed by expat (see expat's XML_SetUnknownEncodingHandler), and 2)
do the conversion from UTF-8 on output. Perhaps there's an elegant way
to combine these rather different tasks.

BTW, it seems we should drop the Encoding enum and use the standard
names of the encodings, passed as strings. 

To avoid performing the encoding name lookups for each character, the
handler could return a kind of handle for the given encoding.

Tom


Tim Crook wrote:
> 
> I noticed that the only input encodings Sablotron supports are the ones
> provided by expat.
> 
> I was thinking it might be a good idea to allow passing through encoding
> tables to expat by using an extension to SablotRegHandler.
> 
> So to do this, another enum member would be added to HandlerType and a
> structure which pointed to the tables would be passed to SablotRegHandler to
> add character sets. Either the structure passed in would be cumulative, or
> something like a linked list could be passed in. Would this be an acceptable
> evolution?



Reply via email to