[issue3362] locale.getpreferredencoding() gives bus error on Mac OS X 10.4.11 PPC
cfr
report at bugs.python.org
Fri Jul 18 14:32:00 CEST 2008
cfr <margali at imapmail.org> added the comment:
A work-around when using python from a shell environment (e.g. from a
bash shell in Terminal) is to issue
export __CF_USER_TEXT_ENCODING=0x1F5:0:0
before starting python. I haven't yet worked out how to apply this to
GUI apps. I tried editing ~/.MacOSX/environment.plist and
~/.CFUserTextEncoding but neither strategy prevents the crash.
I assume the fix works because it means one of the explicitly listed
encodings matches so things never get as far as the code which triggers
the error.
Without the fix, my environment contained
__CF_USER_TEXT_ENCODING=0x1F5:39:79
which does not, apparently, correspond to any of the encodings
explicitly listed in _localemodule.c.
- cfr
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3362>
_______________________________________
More information about the Python-bugs-list
mailing list