Message208858
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. |
|
Date |
User |
Action |
Args |
2014-01-22 22:36:58 | ncoghlan | set | recipients:
+ ncoghlan, vstinner, r.david.murray, Laurent.Mazuel, serhiy.storchaka |
2014-01-22 22:36:58 | ncoghlan | set | messageid: <1390430218.35.0.26129679706.issue20329@psf.upfronthosting.co.za> |
2014-01-22 22:36:58 | ncoghlan | link | issue20329 messages |
2014-01-22 22:36:57 | ncoghlan | create | |
|