X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1c193821a999730fbf6a9bea83763f37daae68f1..a0c6a355b7b53866286ec6263b99f787cfdbe731:/src/common/intl.cpp diff --git a/src/common/intl.cpp b/src/common/intl.cpp index aef903c92b..1fd78f7aca 100644 --- a/src/common/intl.cpp +++ b/src/common/intl.cpp @@ -17,7 +17,7 @@ // headers // ---------------------------------------------------------------------------- -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "intl.h" #endif @@ -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; }