Message50009
| Author |
ngrig |
| Recipients |
| Date |
2006年04月14日.20:21:23 |
| SpamBayes Score |
| Marked as misclassified |
| Message-id |
| In-reply-to |
| Content |
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 |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2007年08月23日 15:48:15 | admin | link | issue1470548 messages |
| 2007年08月23日 15:48:15 | admin | create |
|