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 serhiy.storchaka
Recipients ncoghlan, serhiy.storchaka, vstinner
Date 2015-11-10.20:50:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1447188650.42.0.197662299382.issue25339@psf.upfronthosting.co.za>
In-reply-to
Content
The default encoding of sys.stdio and sys.stdout is determined by (in order of increasing precedence):

1. locale
2. PYTHONIOENCODING
3. Py_SetStandardStreamEncoding()

The default error handler before 3.5 was determined by:

1. 'strict'
2. PYTHONIOENCODING
3. Py_SetStandardStreamEncoding()

The default error handler since 3.5 (issue19977) is determined by:

1. PYTHONIOENCODING
2. locale
3. Py_SetStandardStreamEncoding()

Even if you explicitly specified the error handler by PYTHONIOENCODING, it doesn't have effect in POSIX locale. This doesn't look right to me. I think the order should be the same as for encoding.

Proposed patch makes PYTHONIOENCODING to override locale default for error handler.
History
Date User Action Args
2015-11-10 20:50:50serhiy.storchakasetrecipients: + serhiy.storchaka, ncoghlan, vstinner
2015-11-10 20:50:50serhiy.storchakasetmessageid: <1447188650.42.0.197662299382.issue25339@psf.upfronthosting.co.za>
2015-11-10 20:50:50serhiy.storchakalinkissue25339 messages
2015-11-10 20:50:50serhiy.storchakacreate