locale.setlocale does not detect/set default user locale
description
according to locale module documentation, the following:
import locale
locale.setlocale(locale.LC_ALL, '')
should set locale to the default user value ("An empty string specifies the user’s default settings.")
As far as I can tell, in case when all env variables are not set (LANG et al), it should be "C", but it is not.
At the same time when LANG is set to a reasonable value (e.g. en_US.UTF-8) it should respect it.
In both cases the locale is not set as expected.
In addition call to:
locale.getlocale()
throws:
Traceback (most recent call last):
File "", line 1, in
File "c:\github\IronLanguages\External.LCA_RESTRICTED\Languages\IronPython\27\Lib\locale.py", line 515, in getlocale
File "c:\github\IronLanguages\External.LCA_RESTRICTED\Languages\IronPython\27\Lib\locale.py", line 428, in _parse_localename
ValueError: unknown locale: