wxLocale::GetSystemLanguage() should ignore empty LANG_*/LC_* variables
|Reported by:||pm_kan||Owned by:|
In *NIX builds current version of wxLocale::GetSystemLanguage() returns wxLANGUAGE_UNKNOWN if LC_ALL is set but empty, ignoring non-empty LC_MESSAGES/LANG variables.
It's standard way to ignore empty (null) environment variables in that case. For example, man 7 locale says:
If the second argument to setlocale(3) is empty string, "", for
the default locale, it is determined using the following steps:
- If there is a non-null environment variable LC_ALL, the
value of LC_ALL is used.
- If an environment variable with the same name as one of
the categories above exists and is non-null, its value is
used for that category.
- If there is a non-null environment variable LANG, the
value of LANG is used.
Steps to reproduce:
set environment variables to
GetSystemLanguage() will return wxLANGUAGE_UNKNOWN instead of wxLANGUAGE_RUSSIAN.
Change History (7)
Changed 2 years ago by pm_kan
comment:1 follow-up: ↓ 2 Changed 2 years ago by neis
- Resolution set to port to stable
- Status changed from new to portneeded
comment:4 Changed 2 years ago by VZ
- Resolution changed from port to stable to fixed
- Status changed from new to closed
comment:5 Changed 2 years ago by neis
- Resolution changed from fixed to port to stable
- Status changed from closed to portneeded