◐ Shell
clean mode source ↗

Message 48150 - Python tracker

Due to encoding name normalization of locale module,
UTF-8 locales are normalized to xx_XX.UTF8.  But most
of BSD systems and some other *nixes doesn't allow
normalized forms of locale names such as xx_XX.UTF8. 
So we need to restore the name on _build_localename to
'UTF-8' to make it work on such systems.

>>> import os; os.environ['LC_ALL']='ko_KR.UTF-8'
[25369 refs]
>>> import locale; locale.resetlocale()
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/home/perky/cvs/python/Lib/locale.py", line
402, in resetlocale
    _setlocale(category,
_build_localename(getdefaultlocale()))
locale.Error: unsupported locale setting
[28822 refs]