locale on cygwin

Oleg Broytmann phd at phd.pp.ru
Fri Feb 1 11:34:30 CET 2002


On Fri, Feb 01, 2002 at 09:19:45PM +1100, Andy Todd wrote:
> Thanks for that, but this is what happens if I don't force it;
> 
> """
> $ echo $LANG
> C
> $ python
> Python 2.1.1+ (#1, Jan  8 2002, 00:37:12)
> [GCC 2.95.4 20011006 (Debian prerelease)] on linux2
> Type "copyright", "credits" or "license" for more information.
>  >>> import locale
>  >>> locale.getdefaultlocale()
> Traceback (most recent call last):
>    File "<stdin>", line1, in ?
>    File "/usr/lib/python2.1/locale.py", line 339, in getdefaultlocale
>      return _parse_localename(localename)
>    File "/usr/lib/python2.1/locale.py", line 272, in _parse_localename
>      raise ValueError, 'unknown locale: %s' % localename
> ValueError: unknown locale:
> """

   Strange. It works perfectly for my. On LNAG=C it returns (None, None),
on LANG=ru_RU it returns ("ru_RU", "ISO-8859-5").

Oleg.
-- 
     Oleg Broytmann            http://phd.pp.ru/            phd at phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.




More information about the Python-list mailing list