This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ned.deily
Recipients albertjan, ned.deily, r.david.murray, ronaldoussoren
Date 2014-03-21.07:12:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1395385922.68.0.920103042357.issue20999@psf.upfronthosting.co.za>
In-reply-to
Content
It's hard to be absolutely sure what is going on here since you show several different interpreters and appear to be running on a non-standard, unsupported platform but, as David noted, the primary issue is that the process locale has almost certainly not been set to a correct value.  In general, OS X does not set a default locale for a login process, although programs like Terminal.app may do so by default when they start a login shell for you.  But if you login via ssh, for example, no locale environment variable will be set unless you do it yourself.  You can examine the environment variables in the running interpreter with:

>>> import os,pprint
>>> pprint.pprint(dict(os.environ))
[...]
'LANG': 'en_US.UTF-8',
[...]

Look for LANG or LC_ALL variables.  You can also use locale.getdefaultlocale() to see what the locale module is using as a default.  You can override or establish a default by setting the LANG environment variable in your shell session; to do it "permanently", add the setting to your login shell's startup profile.  For example:

export LANG=en_US.UTF-8

The secondary issue is the segfault.  You say you are running on "Mountain Lion 10.9.1" but OS X Mountain Lion is 10.8.x.  If you are, in fact, running on 10.9.1 (also known an Mavericks) with the python.org 3.3.2, the segfault using the interactive interpreter is the problem documented in Issue18458 and has nothing to do with locale.  The solution for that is to upgrade to a more recent Python 3, either Python 3.3.5 or the newly-released 3.4.0.
History
Date User Action Args
2014-03-21 07:12:02ned.deilysetrecipients: + ned.deily, ronaldoussoren, r.david.murray, albertjan
2014-03-21 07:12:02ned.deilysetmessageid: <1395385922.68.0.920103042357.issue20999@psf.upfronthosting.co.za>
2014-03-21 07:12:02ned.deilylinkissue20999 messages
2014-03-21 07:12:02ned.deilycreate