Author ncoghlan
Recipients Laurent.Mazuel, ncoghlan, r.david.murray, serhiy.storchaka, vstinner
Date 2014-01-22.22:36:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1390430218.35.0.26129679706.issue20329@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2014-01-22 22:36:58ncoghlansetrecipients: + ncoghlan, vstinner, r.david.murray, Laurent.Mazuel, serhiy.storchaka
2014-01-22 22:36:58ncoghlansetmessageid: <1390430218.35.0.26129679706.issue20329@psf.upfronthosting.co.za>
2014-01-22 22:36:58ncoghlanlinkissue20329 messages
2014-01-22 22:36:57ncoghlancreate