]> git.saurik.com Git - wxWidgets.git/commitdiff
more DBCS-related changes (patch 481898)
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 20 Nov 2001 18:49:51 +0000 (18:49 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 20 Nov 2001 18:49:51 +0000 (18:49 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12528 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/fontmap.cpp
src/common/intl.cpp

index 60fd3d2cbc07c0660316ff7cf1bb569e00190991..ca2eaa905ce915d7b76f5f25bfe6a37251977832 100644 (file)
@@ -293,8 +293,8 @@ wxConfigBase *wxFontMapper::GetConfig()
         m_configIsDummy = FALSE;
         // FIXME: ideally, we should add keys from dummy config to the real one now,
         //        but it is a low-priority task because typical wxWin application
-        //        either doesn't use wxConfig at all or creates wxConfig object in 
-        //        wxApp::OnInit(), before any real interaction with the user takes 
+        //        either doesn't use wxConfig at all or creates wxConfig object in
+        //        wxApp::OnInit(), before any real interaction with the user takes
         //        place...
     }
 
@@ -564,6 +564,25 @@ wxFontEncoding wxFontMapper::CharsetToEncoding(const wxString& charset,
                             encoding = (wxFontEncoding)value;
                         }
                     }
+
+                    switch ( value )
+                    {
+                        case 932:
+                            encoding = wxFONTENCODING_CP932;
+                            break;
+
+                        case 936:
+                            encoding = wxFONTENCODING_CP936;
+                            break;
+
+                        case 949:
+                            encoding = wxFONTENCODING_CP949;
+                            break;
+
+                        case 950:
+                            encoding = wxFONTENCODING_CP950;
+                            break;
+                    }
                 }
             }
         }
index 9875b2f1684df160026fae941e4a369911abcf53..0aefb4530a3f2c148257f2367313548419855017 100644 (file)
@@ -1295,11 +1295,31 @@ wxFontEncoding wxLocale::GetSystemEncoding()
 #ifdef __WIN32__
     UINT codepage = ::GetACP();
 
-    // wxWindows only knows about CP1250-1257
+    // wxWindows only knows about CP1250-1257, 932, 936, 949, 950
     if ( codepage >= 1250 && codepage <= 1257 )
     {
         return (wxFontEncoding)(wxFONTENCODING_CP1250 + codepage - 1250);
     }
+
+    if ( codepage == 932 )
+    {
+        return wxFONTENCODING_CP932;
+    }
+
+    if ( codepage == 936 )
+    {
+        return wxFONTENCODING_CP936;
+    }
+
+    if ( codepage == 949 )
+    {
+        return wxFONTENCODING_CP949;
+    }
+
+    if ( codepage == 950 )
+    {
+        return wxFONTENCODING_CP950;
+    }
 #elif defined(__UNIX_LIKE__) && wxUSE_FONTMAP
     wxString encname = GetSystemEncodingName();
     if ( !encname.empty() )