[XML-SIG] Re: [4suite] Python 1.5 support with PyXML 0.6.2/4Suite0.9.2

Martin v. Loewis martin@loewis.home.cs.tu-berlin.de
Fri, 17 Nov 2000 11:08:42 +0100

> I guess I got it wrong again.  OK, but if there is no unicode package,
> the code 4DOM relied on for conversions in Python 1.5.2 pretty much
> breaks, viz
>         from xml.unicode.iso8859 import wstring
> So what am I still missing?

An UTF-8 to Latin-1 converter, I guess :-)

At the moment, if the output encoding is UTF-8, it works, since it
won't even try to import the wstring module. Any other output encoding
fails at the moment. With PyXML 0.5, ISO-8859-1 was also supported (if
you had compiled wstring yourself); anything else fails.

Is that an acceptable restriction? I don't want to restore the wstring
module just to provide Latin-1 conversion, since it is another
extension module (even though I'm the author of the thing).

If you think 4DOM (and PyXML) users are entitled to Latin-1 output
even with Python 1.5, I'd be willing to contribute a UTF-8-to-Latin-1
converter. That one wouldn't go through an intermediate Unicode
representation, and it would be 100% pure Python.

What do you think?