Python 3.0 automatic decoding of UTF16

David Bolen at
Sat Dec 6 23:01:24 CET 2008

Johannes Bauer <dfnsonfsduifb at> writes:

> This is very strange - when using "utf16", endianness should be detected
> automatically. When I simply truncate the trailing zero byte, I receive:

Any chance that whatever you used to "simply truncate the trailing
zero byte" also removed the BOM at the start of the file?  Without it,
utf16 wouldn't be able to detect endianness and would, I believe, fall
back to native order.

-- David

More information about the Python-list mailing list