[New-bugs-announce] [issue16162] Py_FileSystemDefaultEncoding should be updated on locale.setlocale()

Michael Vogt report at bugs.python.org
Mon Oct 8 13:53:07 CEST 2012


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 attach a proof-of-concept patch for this. 

The reason is that if a python application is started without a environment (dbus activation will do that for example) its impossible to work with utf8 encoded filenames. The only workaround is to setup a environment and then os.execv() which seems not ideal.

----------
components: Unicode
files: alllow-chaning-of-Py_FileSystemDefaultEncoding.diff
keywords: patch
messages: 172373
nosy: ezio.melotti, mvo
priority: normal
severity: normal
status: open
title: Py_FileSystemDefaultEncoding should be updated on locale.setlocale()
versions: Python 3.2
Added file: http://bugs.python.org/file27486/alllow-chaning-of-Py_FileSystemDefaultEncoding.diff

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


More information about the New-bugs-announce mailing list