Message50009
This is a patch to bug #1470540. It enables
xml.sax.saxutils.XMLGenerator to work correctly with
UTF-16 (and other encodings not derived from US-ASCII).
The proposed changes are as follows:
- in XMLGenerator.__init__(), create a StreamWriter
instead of a plain stream;
- in XMLGenerator._write(), convert everything to
Unicode before writing;
- in XMLGenerator.endDocument(), flush the StreamWriter.
The patch is applicable to xml/sax/saxutils.py in the
stable release (2.4.3), as well as to
xmlcore/sax/saxutils.py in the current release (2.5).
The smoke test is attached to the bug description in
the Bug Manager.
Regards,
Nikolai Grigoriev |
|
Date |
User |
Action |
Args |
2007-08-23 15:48:15 | admin | link | issue1470548 messages |
2007-08-23 15:48:15 | admin | create | |
|