locale.getlocale() strange behaviour

Benoît Dejean bnetNOSPAM at ifrance.com
Wed Mar 3 00:07:39 CET 2004


here are my locales


benoit at athlon >> locale
LANG=fr_FR.UTF-8
LC_CTYPE="fr_FR.UTF-8"
LC_NUMERIC="fr_FR.UTF-8"
LC_TIME="fr_FR.UTF-8"
LC_COLLATE="fr_FR.UTF-8"
LC_MONETARY="fr_FR.UTF-8"
LC_MESSAGES="fr_FR.UTF-8"
LC_PAPER="fr_FR.UTF-8"
LC_NAME="fr_FR.UTF-8"
LC_ADDRESS="fr_FR.UTF-8"
LC_TELEPHONE="fr_FR.UTF-8"
LC_MEASUREMENT="fr_FR.UTF-8"
LC_IDENTIFICATION="fr_FR.UTF-8"
LC_ALL=fr_FR.UTF-8



(full utf-8 system)



>> python2.3 -c 'import locale; print locale.getlocale()'
(None, None)

>> python2.2 -c 'import locale; print locale.getlocale()'
(None, None)

>> python2.3
Python 2.3.3 (#2, Feb 24 2004, 09:29:20)
[GCC 3.3.3 (Debian)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>> locale.getlocale()
(None, None)


>> python2.2
Python 2.2.3+ (#1, Feb 25 2004, 23:29:31)
[GCC 3.3.3 (Debian)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>> locale.getlocale()
['fr_FR', 'utf']


2.3 fails getting locale
but 2.2 also fails when running inline :/

makes me crazy :D








More information about the Python-list mailing list