X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1c193821a999730fbf6a9bea83763f37daae68f1..61d457caae3e33efe8e0953f79c4a94e366b22d7:/src/common/intl.cpp diff --git a/src/common/intl.cpp b/src/common/intl.cpp index aef903c92b..85ae05c74b 100644 --- a/src/common/intl.cpp +++ b/src/common/intl.cpp @@ -683,11 +683,27 @@ bool wxLocale::Init(const wxChar *szName, static wxWCharBuffer wxSetlocaleTryUTF(int c, const wxChar *lc) { wxMB2WXbuf l = wxSetlocale(c, lc); - if ( lc && lc[0] != 0 && !l ) + if ( !l && lc && lc[0] != 0 ) { wxString buf(lc); - buf += wxT(".utf8"); - l = wxSetlocale(c, buf.c_str()); + wxString buf2; + buf2 = buf + wxT(".UTF-8"); + l = wxSetlocale(c, buf2.c_str()); + if ( !l ) + { + buf2 = buf + wxT(".utf-8"); + l = wxSetlocale(c, buf2.c_str()); + } + if ( !l ) + { + buf2 = buf + wxT(".UTF8"); + l = wxSetlocale(c, buf2.c_str()); + } + if ( !l ) + { + buf2 = buf + wxT(".utf8"); + l = wxSetlocale(c, buf2.c_str()); + } } return l; }