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.

Author trentm
Recipients loewis, ronaldoussoren, trentm
Date 2008-10-06.22:31:28
SpamBayes Score 3.29542e-06
Marked as misclassified No
Message-id <1223332289.52.0.091745162663.issue4060@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2008-10-06 22:31:29trentmsetrecipients: + trentm, loewis, ronaldoussoren
2008-10-06 22:31:29trentmsetmessageid: <1223332289.52.0.091745162663.issue4060@psf.upfronthosting.co.za>
2008-10-06 22:31:28trentmlinkissue4060 messages
2008-10-06 22:31:28trentmcreate