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.

作者 trentm
收信人 loewis, ronaldoussoren, trentm
日期 2008-10-06.22:31:28
SpamBayes Score 3.295417e-06
Marked as misclassified
Message-id <1223332289.52.0.091745162663.issue4060@psf.upfronthosting.co.za>
In-reply-to
内容
This also shows up in the byte ordering that Python uses to encode utf-16:

$ uname -a
Darwin sphinx 8.11.0 Darwin Kernel Version 8.11.0: Wed Oct 10 18:26:00
PDT 2007; root:xnu-792.24.17~1/RELEASE_PPC Power Macintosh powerpc

$ python2.6 -c "import codecs; codecs.open('26.txt', 'w',
'utf-16').write('hi')"
$ od -cx 26.txt
0000000  377 376   h  \0   i  \0
             fffe    6800    6900
0000006

$ /usr/bin/python -c "import codecs; codecs.open('system.txt', 'w',
'utf-16').write('hi')"
$ od -cx system.txt
0000000  376 377  \0   h  \0   i
             feff    0068    0069
0000006


The BOM here ensures, of course, that this is still valid UTF-16
content, but the difference in behaviour here btwn Python versions might
not be intended.
历史
日期 用户 动作 参数
2008-10-06 22:31:29trentm修改recipients: + trentm, loewis, ronaldoussoren
2008-10-06 22:31:29trentm修改messageid: <1223332289.52.0.091745162663.issue4060@psf.upfronthosting.co.za>
2008-10-06 22:31:28trentm链接issue4060 messages
2008-10-06 22:31:28trentm创建