applied patch #424066
(a bit better attempt to detect system encoding in absence of LANGINFO) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10164 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -758,12 +758,18 @@ void wxCSConv::LoadNow()
|
|||||||
// try to see if it's in the environment variables
|
// try to see if it's in the environment variables
|
||||||
// (in most cases this won't work, but I was out of ideas)
|
// (in most cases this won't work, but I was out of ideas)
|
||||||
wxChar *lang = wxGetenv(wxT("LC_ALL"));
|
wxChar *lang = wxGetenv(wxT("LC_ALL"));
|
||||||
if (!lang)
|
|
||||||
lang = wxGetenv(wxT("LC_CTYPE"));
|
|
||||||
if (!lang)
|
|
||||||
lang = wxGetenv(wxT("LANG"));
|
|
||||||
wxChar *dot = lang ? wxStrchr(lang, wxT('.')) : (wxChar *)NULL;
|
wxChar *dot = lang ? wxStrchr(lang, wxT('.')) : (wxChar *)NULL;
|
||||||
if (dot)
|
if (!dot)
|
||||||
|
{
|
||||||
|
lang = wxGetenv(wxT("LC_CTYPE"));
|
||||||
|
dot = lang ? wxStrchr(lang, wxT('.')) : (wxChar *)NULL;
|
||||||
|
}
|
||||||
|
if (!dot)
|
||||||
|
{
|
||||||
|
lang = wxGetenv(wxT("LANG"));
|
||||||
|
dot = lang ? wxStrchr(lang, wxT('.')) : (wxChar *)NULL;
|
||||||
|
}
|
||||||
|
if (dot)
|
||||||
SetName(dot+1);
|
SetName(dot+1);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user