iso-8859-2 in sax

Martin von Loewis loewis at informatik.hu-berlin.de
Mon Sep 17 04:24:11 EDT 2001


arturs at iidea.pl (Artur Skura) writes:

> Has anyone succeeded in making 8859-2 encoding work in Python's xml.sax? 
> If I put it in the header of my XML docs, it complains "unknown encoding",
> (if I just ignore that, it chokes on first non-ASCII char anyway).
> I think I should be able to declare some UnknownEncoding handler with
> expat, but I don't know if it's possible in Python. Pity, because SAX
> is ideal for what I'm doing now.

What version of Python are you using? The pyexpat of Python 2.1, and
of PyXML 0.6.6, both are capable of using Python codecs for converting
documents into Unicode.

Regards,
Martin



More information about the Python-list mailing list