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.

作者 bugok
收信人
日期 2007-08-05.15:01:57
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
内容
Hello,

The bug occurs when writing an XML file using the UTF-16 encoding.
The problem is that the etree encodes every string to utf-16 by itself - meaning, inserting the 0xfffe BOM before every string (tag, text, attribute name, etc.), causing a badly formed utf=16 strings.

A possible solution, which was offered by a co-worker of mine, was to use a utf-16 writer (from codecs.getwriter('utf-16') to write the file.

Best,

BugoK.
历史
日期 用户 动作 参数
2007-08-23 14:59:03admin链接issue1767933 messages
2007-08-23 14:59:03admin创建