Sworddragon added the comment:

> Instead, open() determines the default encoding by calling the same function 
> that's used to initialize Py_FileSystemDefaultEncoding: get_locale_encoding() 
> in Python/pythonrun.c.  Which on POSIX systems calls the POSIX function 
> nl_langinfo().

open() will use at default the encoding of nl_langinfo() as 
sys.getfilesystemencoding() does on *nix. This is the part that looks dirty to 
me. As soon as LANG is set to C open() will rely on 'ascii' due to 
nl_langinfo() like sys.getfilesystemencoding() does too.

----------

_______________________________________
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