Fix compilation with non-16-bit wchar_t

This commit is contained in:
Thomas Goyne 2014-05-06 18:31:19 -07:00
parent 77a2c1bb16
commit 26e7880c8b

View file

@ -273,7 +273,13 @@ wxString LocalizedLanguageName(wxString const& lang) {
if (!iculoc.isBogus()) { if (!iculoc.isBogus()) {
UnicodeString ustr; UnicodeString ustr;
iculoc.getDisplayName(iculoc, ustr); iculoc.getDisplayName(iculoc, ustr);
#ifdef _MSC_VER
return wxString(ustr.getBuffer()); return wxString(ustr.getBuffer());
#else
std::string utf8;
ustr.toUTF8String(utf8);
return to_wx(utf8);
#endif
} }
if (auto info = wxLocale::FindLanguageInfo(lang)) if (auto info = wxLocale::FindLanguageInfo(lang))