[issue9241] SAXParseError on unicode (Japanese) file

Amaury Forgeot d'Arc report at bugs.python.org
Tue Jul 13 14:34:14 CEST 2010


Amaury Forgeot d'Arc <amauryfa at gmail.com> added the comment:

Your file contains the byte \x1a == EOF.
You should not open it in text mode, but in binary mode, otherwise it's truncated.

import xml.sax
xml.sax.parse(open("ff1a.xml", 'rb'), xml.sax.ContentHandler())

works on all versions I tried.

----------
nosy: +amaury.forgeotdarc
resolution:  -> invalid
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9241>
_______________________________________


More information about the Python-bugs-list mailing list