STINNER Victor added the comment:

There was a previous try to use a file encoding different than the locale 
encoding and it introduces too many issues:
https://mail.python.org/pipermail/python-dev/2010-October/104509.html
"Inconsistencies if locale and filesystem encodings are different"

Python uses the fact that the filesystem encoding is the locale encoding in 
various places. For example, Python uses the C codec (mbstowcs) to decode byte 
string from the filesystem encoding before Python codecs can be used. For 
example, the ISO 8859-15 codec is implemented in Python and so you need 
something during Python startup until the import machinery is ready and the 
codec is loaded (using ascii encoding is not correct).

The C locale may use a different encoding. For example on AIX, the ISO 8859-1 
encoding is used. On FreeBSD and Solaris, the ISO 8859-1 encoding is announced 
but the ASCII encoding is used in practice. Python forces the ascii encoding on 
FreeBSD to avoid other issues.

I worked hard to have Python 3 working out of the box on all platform. In my 
opinion, going against the locale encoding in some cases (the C locale) would 
introduce more issues than it solves.

----------

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

Reply via email to