]> git.saurik.com Git - wxWidgets.git/commitdiff
better attempts to try .utf-8 suffix
authorVáclav Slavík <vslavik@fastmail.fm>
Fri, 25 Jul 2003 09:40:21 +0000 (09:40 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Fri, 25 Jul 2003 09:40:21 +0000 (09:40 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22288 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/toback24.txt
src/common/intl.cpp

index 8d975e9d7a5cf0821695c381a556c9fd795516e1..78cea684569f8f7b577b35b2ade7dabc3b6ba5e8 100644 (file)
@@ -216,11 +216,15 @@ done
 24. Fix wxLocale::Init to try xx_YY.utf8 on systems where xx_YY fails
 (presumably RedHat; do it in Unicode mode only)
 
 24. Fix wxLocale::Init to try xx_YY.utf8 on systems where xx_YY fails
 (presumably RedHat; do it in Unicode mode only)
 
-See: Patch [ 766893 ]
+See: Patch [ 766893 ], [ 775994 ]
 Checking in intl.cpp;
 /pack/cvsroots/wxwindows/wxWindows/src/common/intl.cpp,v  <--  intl.cpp
 new revision: 1.97; previous revision: 1.96
 done
 Checking in intl.cpp;
 /pack/cvsroots/wxwindows/wxWindows/src/common/intl.cpp,v  <--  intl.cpp
 new revision: 1.97; previous revision: 1.96
 done
+Checking in intl.cpp;
+/pack/cvsroots/wxwindows/wxWindows/src/common/intl.cpp,v  <--  intl.cpp
+new revision: 1.100; previous revision: 1.99
+done
 Checking in changes.txt;
 /pack/cvsroots/wxwindows/wxWindows/docs/changes.txt,v  <--  changes.txt
 new revision: 1.297; previous revision: 1.296
 Checking in changes.txt;
 /pack/cvsroots/wxwindows/wxWindows/docs/changes.txt,v  <--  changes.txt
 new revision: 1.297; previous revision: 1.296
index aef903c92b6b1562096842fa75e2e75d20a3e4d6..85ae05c74bb29f5db7ce151ffdd6398e579c45bc 100644 (file)
@@ -683,11 +683,27 @@ bool wxLocale::Init(const wxChar *szName,
 static wxWCharBuffer wxSetlocaleTryUTF(int c, const wxChar *lc)
 {
     wxMB2WXbuf l = wxSetlocale(c, lc);
 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);
     {
        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;
 }
     }
     return l;
 }