STINNER Victor <vstin...@python.org> added the comment:

sys.getlocaleencoding() versus locale.getencoding().

For me, the Python locale module should use the C API to access the Unix 
locales like LC_CTYPE, nl_langinfo(CODESET), etc.

The sys module are more for things specific to Python, like 
sys.getfilesystemencoding().

Since sys.getlocaleencoding() would be a fixed value for the whole process life 
time, I agree that the sys module is a better place.

I can write a PR adding sys.getlocaleencoding() if we agree on the API.

----------

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

Reply via email to