homepage

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 vstinner
Recipients Marcus.Gröber, ezio.melotti, lovelylain, serhiy.storchaka, vstinner
Date 2012年10月09日.21:17:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1349817451.5.0.448433583768.issue15278@psf.upfronthosting.co.za>
In-reply-to
Content
> with codecs.open('test.txt', 'wb', 'utf-16-le') as fp:
Since Python 2.6+, you can use io.open() which uses the new io library. The io library uses TextIOWrapper which uses incremental encoder and decoder and so handles multibyte encodings correctly (as UTF-16).
Said differently, this issue is already fixed in the io library.
It remembers me that I should propose again my PEP 400 :-)
History
Date User Action Args
2012年10月09日 21:17:31vstinnersetrecipients: + vstinner, ezio.melotti, serhiy.storchaka, lovelylain, Marcus.Gröber
2012年10月09日 21:17:31vstinnersetmessageid: <1349817451.5.0.448433583768.issue15278@psf.upfronthosting.co.za>
2012年10月09日 21:17:31vstinnerlinkissue15278 messages
2012年10月09日 21:17:31vstinnercreate

AltStyle によって変換されたページ (->オリジナル) /