This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

作者 Richard.Urwin
收信人 BreamoreBoy, Richard.Urwin, amaury.forgeotdarc, bugok, effbot, flox, nnorwitz, rurwin
日期 2010-07-26.13:24:26
SpamBayes Score 0.0014398023
Marked as misclassified
Message-id <1280150669.81.0.281018228654.issue1767933@psf.upfronthosting.co.za>
In-reply-to
内容
I can't produce an automated test, for want of time, but here is a demonstrator.

Grab the example XHTML from http://docs.python.org/library/xml.etree.elementtree.html#elementtree-objects or use some tiny ASCII-encoded xml file. Save it as "file.xml" in the same folder as bug-test.py attached here.

Execute bug-test.xml

file.xml is read and then written in UTF-16. The output file is then read and dumped to stdout as a byte-stream.

1. To be correct UTF-16, the output should start with 255 254, which should never occur in the rest of the file.

2. The rest of the output (including the first line) should alternate zeros with ASCII character codes.

3. The file output.xml should be loadable in a UTF16-capable text editor (eg jEdit), be recognised as UTF-16 and be identical in terms of content to file.xml
历史
日期 用户 动作 参数
2010-07-26 13:24:30Richard.Urwin修改recipients: + Richard.Urwin, effbot, nnorwitz, amaury.forgeotdarc, bugok, rurwin, flox, BreamoreBoy
2010-07-26 13:24:29Richard.Urwin修改messageid: <1280150669.81.0.281018228654.issue1767933@psf.upfronthosting.co.za>
2010-07-26 13:24:27Richard.Urwin链接issue1767933 messages
2010-07-26 13:24:26Richard.Urwin创建