"encoding specified in XML declaration is incorrect"

2004-12-02 Thread Gustaf Liljegren
I'm using xml.sax.parseString to read an XML file. The XML file contains a few words in Russian, and is encoded in UTF-8 using C#. In the example below, MyParser() is my SAX ContentHandler class. My first try was: f = open('words.xml', 'r') s = f.read() xml.sax.parseString(s, MyParser()) This pr

xml.sax in Python 2.3.4

2004-12-01 Thread Gustaf Liljegren
After a long break with Python I'm trying to get started again. I need to do some SAX processing, but it seems things have changed, and I can't find any docs describing how to make things work *today*. The SAX example in the XML HOWTO [1] doesn't work anymore. I get this error: D:\Test>python c