[XML-SIG] problems reading iso-8859-1 data
Fred L. Drake, Jr.
fdrake@acm.org
Sun, 29 Apr 2001 22:05:59 -0400 (EDT)
Don Allingham writes:
> I have an XML file with iso-8859-1 encoding. The sax parser (expat)=20=
> seems to translating charaters above 128 to to separate characters.=20=
> For example "=E9" in the xml file is being interpreted as "=C3=A9" b=
y the=20
> parser. (I'm running python 1.5.2 with PyXML 0.6.5)
>=20
> Am I missing something obvious?
I'm not sure how obvious it is, but what you are missing is that the
expat output under Python 1.5.2 will always be UTF-8 encoded. (Under
more recent versions of Python, Unicode strings are provided by
default, but UTF-8 can be requested if desired.)
-Fred
--=20
Fred L. Drake, Jr. <fdrake at acm.org>
PythonLabs at Digital Creations