X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/15ad38c34f3bbd0a0c912dee5575ff2d3bb8ed9a..3ca1bf5add01419ba173f0567b060fdd9fd605f9:/src/common/fmapbase.cpp diff --git a/src/common/fmapbase.cpp b/src/common/fmapbase.cpp index 07faf9ef98..f1e324cb92 100644 --- a/src/common/fmapbase.cpp +++ b/src/common/fmapbase.cpp @@ -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