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
1 changed files with 6 additions and 0 deletions

View File

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