Author vstinner
Recipients vstinner
Date 2011-07-07.11:20:54
SpamBayes Score 0.0168286
Marked as misclassified No
Message-id <1310037655.23.0.74604040049.issue12512@psf.upfronthosting.co.za>
In-reply-to
Content
There is a similar bug for append mode:

import codecs
_open = codecs.open
#_open = open
filename = "test"
with _open(filename, 'w', encoding='utf_16') as f:
    f.write('abc')
with _open(filename, 'a', encoding='utf_16') as f:
    f.write('def')
with _open(filename, 'r', encoding='utf_16') as f:
    content = f.read()
    assert content == 'abcdef', ascii(content)

This bug has also been fixed by the issue #5006 in the io module.
History
Date User Action Args
2011-07-07 11:20:55vstinnersetrecipients: + vstinner
2011-07-07 11:20:55vstinnersetmessageid: <1310037655.23.0.74604040049.issue12512@psf.upfronthosting.co.za>
2011-07-07 11:20:54vstinnerlinkissue12512 messages
2011-07-07 11:20:54vstinnercreate