]> git.saurik.com Git - wxWidgets.git/commitdiff
fix for the short locale name construction
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 24 Aug 2001 18:19:54 +0000 (18:19 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 24 Aug 2001 18:19:54 +0000 (18:19 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11458 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/intl.cpp

index 5e03cbdc18233d250b4d75459618e59fb4761dfc..12beb715c7cef6efa5baee002ee936232d8fa46d 100644 (file)
@@ -615,7 +615,12 @@ bool wxLocale::Init(const wxChar *szName,
   if ( m_strShort.IsEmpty() ) {
     // FIXME I don't know how these 2 letter abbreviations are formed,
     //       this wild guess is surely wrong
-    m_strShort = tolower(szLocale[0]) + tolower(szLocale[1]);
+    if ( szLocale[0] )
+    {
+        m_strShort += (wxChar)wxTolower(szLocale[0]);
+        if ( szLocale[1] )
+            m_strShort += (wxChar)wxTolower(szLocale[1]);
+    }
   }
 
   // save the old locale to be able to restore it later