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 pitrou
Recipients amaury.forgeotdarc, pitrou, vstinner
Date 2009-01-07.12:59:00
SpamBayes Score 0.09866016
Marked as misclassified No
Message-id <1231333141.17.0.860846830035.issue4862@psf.upfronthosting.co.za>
In-reply-to
Content
Well, there are other problems with utf-16, e.g. when opening an
existing file for appending, the BOM is written again:

>>> f = open('utf16.txt', 'w', encoding='utf-16')
>>> f.write('abc')
3
>>> f.close()
>>> f = open('utf16.txt', 'a', encoding='utf-16')
>>> f.write('def')
3
>>> f.close()
>>> open('utf16.txt', 'r', encoding='utf-16').read()
'abc\ufeffdef'


Who said TextIOWrapper was sane? :-o
History
Date User Action Args
2009-01-07 12:59:01pitrousetrecipients: + pitrou, amaury.forgeotdarc, vstinner
2009-01-07 12:59:01pitrousetmessageid: <1231333141.17.0.860846830035.issue4862@psf.upfronthosting.co.za>
2009-01-07 12:59:00pitroulinkissue4862 messages
2009-01-07 12:59:00pitroucreate