Message254463
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. |
|
Date |
User |
Action |
Args |
2015-11-10 20:50:50 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, ncoghlan, vstinner |
2015-11-10 20:50:50 | serhiy.storchaka | set | messageid: <1447188650.42.0.197662299382.issue25339@psf.upfronthosting.co.za> |
2015-11-10 20:50:50 | serhiy.storchaka | link | issue25339 messages |
2015-11-10 20:50:50 | serhiy.storchaka | create | |
|