# the LANGUAGE variable may contain a colon-separated list of
# language codes; we just pick the language on the list
locale = locale.split(':')[0]
- if locale in ('C', 'POSIX'):
+ if locale.split('.')[0] in ('C', 'POSIX'):
locale = 'en_US_POSIX'
elif aliases and locale in aliases:
locale = aliases[locale]
os_environ['LC_MESSAGES'] = 'POSIX'
assert default_locale('LC_MESSAGES') == 'en_US_POSIX'
+ for value in ['C', 'C.UTF-8', 'POSIX']:
+ os_environ['LANGUAGE'] = value
+ assert default_locale() == 'en_US_POSIX'
+
def test_negotiate_locale():
assert (core.negotiate_locale(['de_DE', 'en_US'], ['de_DE', 'de_AT']) ==