[New-bugs-announce] [issue10090] python -m locale fails on OSX

Alexander Belopolsky report at bugs.python.org
Wed Oct 13 21:33:12 CEST 2010

New submission from Alexander Belopolsky <belopolsky at users.sourceforge.net>:

$ python -m locale
Locale aliasing:

Locale defaults as determined by getdefaultlocale():
Language:  en_US
Encoding:  UTF8

Locale settings after calling resetlocale():
Traceback (most recent call last):

  File "Lib/locale.py", line 548, in resetlocale
    _setlocale(category, _build_localename(getdefaultlocale()))
locale.Error: unsupported locale setting

Apparently the problem is due to locale.getdefaultlocale() returning encoding as 'UTF8' while locale.setlocale() expects 'UTF-8'.

components: Library (Lib)
messages: 118567
nosy: belopolsky
priority: normal
severity: normal
stage: unit test needed
status: open
title: python -m locale fails on OSX
type: behavior
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list