[issue16162] Py_FileSystemDefaultEncoding should be updated on locale.setlocale()

2012-10-09 Thread Michael Vogt
Michael Vogt added the comment: Thanks for this detailed explaination! I will workaround this outside of python (that is easy ;) - I just thought that it would be a good idea to be able to change the fsencoding (and therefore send the patch), but in the light of e.g. sys.path it seems to be in

[issue16162] Py_FileSystemDefaultEncoding should be updated on locale.setlocale()

2012-10-08 Thread R. David Murray
Changes by R. David Murray : -- resolution: -> invalid stage: -> committed/rejected status: open -> closed ___ Python tracker ___ __

[issue16162] Py_FileSystemDefaultEncoding should be updated on locale.setlocale()

2012-10-08 Thread STINNER Victor
STINNER Victor added the comment: > I think that Py_FileSystemDefaultEncoding should get updated when > locale.setlocale() is run automatically This is not a good idea. The two following expressions must be True on UNIX: os.fsencode(os.fsdecode(name)) == name os.fsdecode(os.fsencode(name)) == n

[issue16162] Py_FileSystemDefaultEncoding should be updated on locale.setlocale()

2012-10-08 Thread Martin v . Löwis
Martin v. Löwis added the comment: It actually *is* possible to work with UTF-8-encoded file names even in an ASCII locale. It should work automatically, using the PEP 383 mechanism. I'm -0 on allowing changes to the file system encoding. It may lead to mojibake, if some file names were read f

[issue16162] Py_FileSystemDefaultEncoding should be updated on locale.setlocale()

2012-10-08 Thread R. David Murray
Changes by R. David Murray : -- nosy: +haypo, pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue16162] Py_FileSystemDefaultEncoding should be updated on locale.setlocale()

2012-10-08 Thread Michael Vogt
New submission from Michael Vogt: The Py_FileSystemDefaultEncoding is very static right now and only set on interpreter statup AFAICT. There appears to be no way to switch that later. I think that Py_FileSystemDefaultEncoding should get updated when locale.setlocale() is run automatically and