消息 [50009]
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 |
|
| 日期 |
用户 |
动作 |
参数 |
| 2007-08-23 15:48:15 | admin | 链接 | issue1470548 messages |
| 2007-08-23 15:48:15 | admin | 创建 | |
|