[issue9167] argv double encoding on OSX
Ronald Oussoren
report at bugs.python.org
Sat Jul 24 14:47:03 CEST 2010
Ronald Oussoren <ronaldoussoren at mac.com> added the comment:
Using the CF API to fetch the system encoding won't work:
Using PyObjC:
>>> CFStringConvertEncodingToIANACharSetName(CFStringGetSystemEncoding())
u'macintosh'
There doesn't seem to be another way to extract the prefered encoding from the system.
I see two possible resolutions for this issue:
* Close as won't fix
This is technically a platform issue that has been fixed in OSX 10.5
* Add a workaround that explicitly sets os.environ['LANG'] to
'en_US.UTF-8' before converting argument and environment values
to Unicode (only on OSX < 10.4, when LANG=C and of course resetting
the previous value after conversion)
I have a 10.4 system I could develop this on, but that's currently in a different country than me.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9167>
_______________________________________
More information about the Python-bugs-list
mailing list