- // FIXME
-#ifndef __WXWINCE__
- SetThreadLocale(lcid);
-#endif
- // NB: we must translate LCID to CRT's setlocale string ourselves,
- // because SetThreadLocale does not modify change the
- // interpretation of setlocale(LC_ALL, "") call:
- wxChar buffer[256];
- buffer[0] = wxS('\0');
- GetLocaleInfo(lcid, LOCALE_SENGLANGUAGE, buffer, 256);
- locale << buffer;
- if (GetLocaleInfo(lcid, LOCALE_SENGCOUNTRY, buffer, 256) > 0)
- locale << wxS("_") << buffer;
- if (GetLocaleInfo(lcid, LOCALE_IDEFAULTANSICODEPAGE, buffer, 256) > 0)
- {
- codepage = wxAtoi(buffer);
- if (codepage != 0)
- locale << wxS(".") << buffer;
- }
- if (locale.empty())
+ // change locale used by Windows functions
+ ::SetThreadLocale(lcid);
+#endif
+
+ // and also call setlocale() to change locale used by the CRT
+ locale = info->GetLocaleName();
+ if ( locale.empty() )