RE: [xml] Register character encoding handler
- From: "Henke, Markus" <Markus_Henke ordat com>
- To: "'xml gnome org'" <xml gnome org>
- Subject: RE: [xml] Register character encoding handler
- Date: Wed, 6 Feb 2002 16:35:51 +0100
-----Original Message-----
From: Daniel Veillard [mailto:veillard redhat com]
Sent: Wednesday, February 06, 2002 4:04 PM
To: Henke, Markus
Cc: 'xml gnome org'
Subject: Re: [xml] Register character encoding handler
On Wed, Feb 06, 2002 at 03:47:26PM +0100, Henke, Markus wrote:
Hello,
since i've to support HP-ROMAN8 (-9) character encoding (and can't
ensure libiconv on every supported platform) i've written my own
'xmlCharEncodingInputFunc' and 'xmlCharEncodingOutputFunc'.
The documentation says that i've to register them using
'xmlNewCharEncodingHandler()', but that function is
*static* in 'encoding.c' and isn't declared in 'encoding.h'.
Just by mistake (and nobody has needed it by now) or have
i got something wrong?
(A fix would be trivial, but strictly seen an API change, so i
don't post it here...)
Just allocate an xmlCharEncodingHandler structure, fill it
up with "HP-ROMAN8", the input and output functions, and register
it with xmlRegisterCharEncodingHandler() giving the address of
the block.
I don't know why I made xmlNewCharEncodingHandler() static,
but there is still an API to register those.
I see.
xmlNewCharEncodingHandler() seemed to be more comfortable
since it encapsulates the necessary/useful steps to register
character handler, but it all can be done using existing
API functions.
Daniel
Thanx, Markus
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]