[ python-Bugs-1080864 ] locale.py doesn't recognize valid locale
setting
SourceForge.net
noreply at sourceforge.net
Tue Dec 7 22:39:36 CET 2004
Bugs item #1080864, was opened at 2004-12-07 21:23
Message generated for change (Comment added) made by zgoda
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1080864&group_id=5470
Category: Python Library
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: stas Z (childsplay)
Assigned to: Nobody/Anonymous (nobody)
Summary: locale.py doesn't recognize valid locale setting
Initial Comment:
stas at mobi:~$ locale
LANG=nb_NO
[...]
stas at mobi:~$ python
Python 2.3.4 (#2, Sep 24 2004, 08:39:09)
[GCC 3.3.4 (Debian 1:3.3.4-12)] on linux2
Type "help", "copyright", "credits" or "license" for
more information.
>>> import locale
>>> locale.getdefaultlocale()
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib/python2.3/locale.py", line 346, in
getdefaultlocale
return _parse_localename(localename)
File "/usr/lib/python2.3/locale.py", line 280, in
_parse_localename
raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: nb_NO
>>>
----------------------------------------------------------------------
Comment By: Jarek Zgoda (zgoda)
Date: 2004-12-07 22:39
Message:
Logged In: YES
user_id=92222
getdefaultlocale() is often used to get default encoding for
current system locale.
And, if function is provided in standard library, why
shouldn't one use it?
----------------------------------------------------------------------
Comment By: Martin v. Löwis (loewis)
Date: 2004-12-07 21:25
Message:
Logged In: YES
user_id=21627
Why do you want to use getdefaultlocale()?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1080864&group_id=5470
More information about the Python-bugs-list
mailing list