Nick Coghlan added the comment:

PEP 538 wouldn't help here, as there's nothing wrong with CPython's assumptions 
about the text encoding to use for operating system interfaces - it's assuming 
UTF-8 (because it's Mac OS X) and that assumption is correct (because it's Mac 
OS X).

The problem appears to be that locale.py was written primarily for Linux, and 
hence makes assumptions that aren't valid on BSD and Mac OS X.

Dmitry's suggested solution of taking the BSD/Mac OS X specific locale of 
"UTF-8" and universally accepting it as meaning (None, "UTF-8") sems like a 
sensible step forward, even if it doesn't resolve all the discrepancies.

Where PEP 538 and PEP 540 would come into play is when this setting gets 
forwarded over SSH to Linux servers (as then CPython *will* get the nominal 
system text encoding wrong), but that's independent of getting the locale 
module to handle it more gracefully.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue18378>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to