[XML-SIG] PyExpat and german umlaute

Martin v. Loewis martin@loewis.home.cs.tu-berlin.de
Wed, 30 May 2001 19:17:38 +0200


> I try to use pyexpat, an ISO-8859-1 encoded xml-file. but if there
> are any german umlaute, PyExpat raises an exception: UnicodeError:
> ASCII encoding error: ordinal not in range(128).  PyExpat has got
> version 2.4.
>
> What is wrong with it.

It is an error in your code. You should not try to write Unicode
objects directly into byte-oriented files; instead, you should invoke
an appropriate .encode method first.

Regards,
Martin