[issue9630] Reencode filenames when setting the filesystem encoding

Antoine Pitrou report at bugs.python.org
Fri Sep 24 14:08:33 CEST 2010


Antoine Pitrou <pitrou at free.fr> added the comment:

>It is not possible to set Py_FilesystemDefaultEncoding before loading 
>the first module. initfsencoding() loads codecs and encodings modules to 
>check the codec name.

Not sure it's related, but there seems to be a bug:

$ ./python -c "import sys; print(sys.getfilesystemencoding())"
utf-8
$ LC_CTYPE=latin1 ./python -c "import sys; print(sys.getfilesystemencoding())"
ascii
$ LC_CTYPE=fr_FR:iso8859-1 ./python -c "import sys; print(sys.getfilesystemencoding())"
ascii

----------
nosy: +pitrou

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9630>
_______________________________________


More information about the Python-bugs-list mailing list