XML: minidom toxml() does not work for non English files! :-(
Michael Hudson
mwh at python.net
Tue May 7 04:51:07 EDT 2002
martin at v.loewis.de (Martin v. Loewis) writes:
> Trent Mick <trentm at ActiveState.com> writes:
>
> > Jaroslaw mentions that the problem goes away if he replaces
> > ActivePython 2.2.1's StringIO.py with the one from the PythonLabs
> > distro. That would be fine (a bug in ActivePython) except that
> > ActivePython has the more *recent* StringIO.py. So is Jaroslaw
> > misusing StringIO.py or is this StringIO.py checkin incorrect or
> > am I confused:
>
> The most recent StringIO (1.22) has this:
>
> class StringIO:
> def __init__(self, buf = ''):
> # Force self.buf to be a string or unicode
> if type(buf) is not types.UnicodeType:
> buf = str(buf)
>
> IMO, this is "more correct" than just calling str every time.
Except in --disable-unicode builds...
Cheers,
M.
--
MARVIN: Oh dear, I think you'll find reality's on the blink again.
-- The Hitch-Hikers Guide to the Galaxy, Episode 12
More information about the Python-list
mailing list