[XML-SIG] Re: [4suite] Python 1.5 support with PyXML
Fri, 17 Nov 2000 08:42:46 -0700
"Martin v. Loewis" wrote:
> > 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).
Actually, it provided more than just Latin-1. It provided all the
ISO-8859-X conversions. And we did used to receive questions about
ISO-8859-7, for instance.
> 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?
Well, we at Fourthought have moved on to Python 1.5.2, but as we all
heard from the responses to my question yesterday, some have reasons to
stick to Python 1.5.2 for now.
So I guess the big question is: for those sticking with Python 1.5.2, is
the old ISO conversion facility from xml.unicode still needed?
Uche Ogbuji Principal Consultant
firstname.lastname@example.org +1 303 583 9900 x 101
Fourthought, Inc. http://Fourthought.com
4735 East Walnut St, Ste. C, Boulder, CO 80301-2537, USA
Software-engineering, knowledge-management, XML, CORBA, Linux, Python