From 26e7880c8b03924d9d16eadc0decbaa1365ccc1f Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Tue, 6 May 2014 18:31:19 -0700 Subject: [PATCH] Fix compilation with non-16-bit wchar_t --- src/utils.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/utils.cpp b/src/utils.cpp index c77013f08..24aacb45f 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -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))