-
Bug
-
Resolution: Fixed
-
Normal
-
2.2.2
-
None
-
Linux
POSIX
On a POSIX system if the environment is configured to have different locales (e.g. setting display language to German, but number formatting to English) Picard fails to detect the system configured language.
The reason is that Picard assumes that locale.setlocale(locale.LC_ALL, '') always returns the default locale name, but this is only true if all locale categories have the same locale. If one or more locale categories define different locales the returned value is instead a string like:
"'LC_CTYPE=de_DE.UTF-8;LC_NUMERIC=en_GB.UTF-8;LC_TIME=en_GB.UTF-8;LC_COLLATE=de_DE.UTF-8;LC_MONETARY=en_GB.UTF-8;LC_MESSAGES=de_DE.UTF-8;LC_PAPER=en_GB.UTF-8;LC_NAME=de_DE.UTF-8;LC_ADDRESS=de_DE.UTF-8;LC_TELEPHONE=de_DE.UTF-8;LC_MEASUREMENT=en_GB.UTF-8;LC_IDENTIFICATION=de_DE.UTF-8'"