➜

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.

作者 ncoghlan
收信人 Laurent.Mazuel, ncoghlan, r.david.murray, serhiy.storchaka, vstinner
日期 2014-01-22.22:36:57
SpamBayes Score -1.0
Marked as misclassified 是
Message-id <1390430218.35.0.26129679706.issue20329@psf.upfronthosting.co.za>
In-reply-to
内容
The POSIX locale tells Python 3 to use ASCII for all operating system interfaces, including the standard streams. This is an antiquated behaviour in the POSIX spec that Python 3 doesn't currently work around.

Issue 19977 is a proposal to work around this limitation by default.

As an immediate workaround, it's possible to either set PYTHONIOENCODING explicitly so Python ignores the incorrect encoding claims from the OS, or else to do your own encoding and write directly to the sys.stdout.buffer binary interface.

Python 3.4 also allows setting *just* the default error handler for the streams, while still getting the encoding from the OS.
历史
日期 用户 动作 参数
2014-01-22 22:36:58ncoghlan修改recipients: + ncoghlan, vstinner, r.david.murray, Laurent.Mazuel, serhiy.storchaka
2014-01-22 22:36:58ncoghlan修改messageid: <1390430218.35.0.26129679706.issue20329@psf.upfronthosting.co.za>
2014-01-22 22:36:58ncoghlan链接issue20329 messages
2014-01-22 22:36:57ncoghlan创建