New submission from Vlada Peric <vlada.pe...@gmail.com>:

The sr_RS locale in glibc corresponds to the Cyrillic script, while the 
agreed upon locale for the Latin alphabet is sr...@latin. Unfortunately, 
the locale python module crashes when trying to parse this locale. Here 
is the traceback:

File "/usr/lib/python2.6/locale.py", line 497, in get locale
  return _parse_localename(localename)
File "usr/lib/python2.6/locale.py", line 410, in _parse_localename
  raise ValueError, 'unknown locale: %s' % localename

Looking at the code, it only checks for the @euro modifier and ignores 
all other modifiers (including @latin). This is all when I set 
lang=sr...@latin. If I use lang=sr_rs.u...@latin (also allowed by 
glibc), Python interprets this as the sr_RS locale (which is wrong, as 
that is for Cyrillic).

----------
components: Unicode
messages: 91404
nosy: VPeric
severity: normal
status: open
title: locale.py: can't parse sr...@latin locale
type: crash
versions: Python 2.6

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue6668>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to