homepage

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.

classification
Title: python -m locale fails on OSX
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.1, Python 3.2, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: 10154 Superseder:
Assigned To: Nosy List: belopolsky, eric.araujo, lemburg, loewis, ronaldoussoren
Priority: normal Keywords:

Created on 2010年10月13日 19:33 by belopolsky, last changed 2022年04月11日 14:57 by admin. This issue is now closed.

Messages (2)
msg118567 - (view) Author: Alexander Belopolsky (belopolsky) * (Python committer) Date: 2010年10月13日 19:33
$ 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'.
msg136151 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2011年05月17日 12:15
I've applied a fix for #10154 and that also fixes this problem.
History
Date User Action Args
2022年04月11日 14:57:07adminsetgithub: 54299
2011年05月17日 12:15:25ronaldoussorensetstatus: open -> closed

nosy: + ronaldoussoren
messages: + msg136151

resolution: fixed
stage: test needed -> resolved
2010年10月22日 17:37:08eric.araujosetdependencies: + locale.normalize strips "-" from UTF-8, which fails on Mac
2010年10月19日 16:58:02eric.araujosetnosy: + loewis, eric.araujo

versions: - Python 2.6
2010年10月17日 03:37:51r.david.murraysetnosy: + lemburg
2010年10月13日 19:33:11belopolskycreate

AltStyle によって変換されたページ (->オリジナル) /