X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6e4ae332ac7d85be3592640ffef56a60924cc1c9..4b5d2be39657bb364c9111c4d13b1eecb8f3b69f:/src/common/xlocale.cpp?ds=inline diff --git a/src/common/xlocale.cpp b/src/common/xlocale.cpp index 1f00c13c98..6adb86b8d9 100644 --- a/src/common/xlocale.cpp +++ b/src/common/xlocale.cpp @@ -77,6 +77,8 @@ wxXLocale& wxXLocale::GetCLocale() return *gs_cLocale; } +#ifdef wxHAS_XLOCALE_SUPPORT + wxXLocale::wxXLocale(wxLanguage lang) { const wxLanguageInfo * const info = wxLocale::GetLanguageInfo(lang); @@ -86,12 +88,10 @@ wxXLocale::wxXLocale(wxLanguage lang) } else { - Init(info->CanonicalName); + Init(info->GetLocaleName().c_str()); } } -#ifdef wxHAS_XLOCALE_SUPPORT - #if wxCHECK_VISUALC_VERSION(8) // ---------------------------------------------------------------------------- @@ -199,11 +199,11 @@ GEN_ISFUNC(wxIsspace_l, CTYPE_SPACE) GEN_ISFUNC(wxIsupper_l, CTYPE_UPPER) GEN_ISFUNC(wxIsxdigit_l, CTYPE_XDIGIT) -wxUniChar wxTolower_l(const wxUniChar& c, const wxXLocale& loc) +int wxTolower_l(const wxUniChar& c, const wxXLocale& loc) { wxCHECK(loc.IsOk(), false); - if(CTYPE_TEST(c, CTYPE_UPPER)) + if(CTYPE_TEST(c.GetValue(), CTYPE_UPPER)) { return c - 'A' + 'a'; } @@ -211,11 +211,11 @@ wxUniChar wxTolower_l(const wxUniChar& c, const wxXLocale& loc) return c; } -wxUniChar wxToupper_l(const wxUniChar& c, const wxXLocale& loc) +int wxToupper_l(const wxUniChar& c, const wxXLocale& loc) { wxCHECK(loc.IsOk(), false); - if(CTYPE_TEST(c, CTYPE_LOWER)) + if(CTYPE_TEST(c.GetValue(), CTYPE_LOWER)) { return c - 'a' + 'A'; }