[XML-SIG] yet another output encoding

Walter Dörwald walter@livinglogic.de
Thu, 31 Jan 2002 19:30:19 +0100


M.-A. Lemburg wrote:

> "Martin v. Loewis" wrote:
>

 >> [...]

>>
>>http://sourceforge.net/tracker/index.php?func=detail&aid=432401&group_id=5470&atid=305470
>>
>>That patch would enable to insert character references only if the
>>character is unencodable in the target encoding, and it was precisely
>>designed to support XML/HTML.
>>
> 
> Not only that: it was designed to enable error handler callbacks.
> 
> Unfortunately, work on the patch is not finished yet: the design
> should cover both the encoding and decoding parts using the same
> strategy.


AFAICR it does.

> Walter and I postponed the work on this until after
> the 2.2 release. It's still on the plate though.
> [...]


As soon as I find the time, I'll try to do a different version of

the patch, i.e. one that doesn't require such vast changes to
the C API: The string will still be passed as a
Py_UNICODE */int pair and the encoding as a char *.
Maybe the chances of inclusion into the Python core for this
new patch will be better. This patch has another advantage: for
well known error handling names (e.g. "xmlreplace" for encoding)
the replacement algorithm could be implemented directly in the
encoder/decoder for maximum performance.

Now the only remaining problem is time! :-/

Bye,
    Walter Dörwald