]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/fmapbase.cpp
overload operator<<() for wchar_t too (if applicable/possible); this fixes the proble...
[wxWidgets.git] / src / common / fmapbase.cpp
index 07faf9ef98ecba03afe6a2c48ab3b4da6f7afef9..f1e324cb9218a95fae4bf60d51216d5a1ce9fcfa 100644 (file)
@@ -519,6 +519,11 @@ wxFontMapperBase::NonInteractiveCharsetToEncoding(const wxString& charset)
         {
             encoding = wxFONTENCODING_EUC_JP;
         }
+        else if ( cs == wxT("EUC-KR") ||
+                  cs == wxT("EUC_KR") )
+        {
+            encoding = wxFONTENCODING_CP949;
+        } 
         else if ( cs == wxT("KOI8-R") ||
                   cs == wxT("KOI8-RU") )
         {
@@ -706,5 +711,26 @@ wxString wxFontMapperBase::GetEncodingName(wxFontEncoding encoding)
     return str;
 }
 
+/* static */
+wxFontEncoding wxFontMapperBase::GetEncodingFromName(const wxString& name)
+{
+    const size_t count = WXSIZEOF(gs_encodingNames);
+
+    for ( size_t i = 0; i < count; i++ )
+    {
+        if ( gs_encodingNames[i] == name )
+        {
+            return gs_encodings[i];
+        }
+    }
+
+    if ( name == _("default") )
+    {
+        return wxFONTENCODING_DEFAULT;
+    }
+
+    return wxFONTENCODING_MAX;
+}
+
 #endif // wxUSE_FONTMAP