added support for koi8-u

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26695 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2004-04-10 23:43:49 +00:00
parent 557d6f3247
commit 15ad38c34f
8 changed files with 42 additions and 4 deletions

View File

@@ -72,6 +72,7 @@ static wxFontEncoding gs_encodings[] =
wxFONTENCODING_ISO8859_14,
wxFONTENCODING_ISO8859_15,
wxFONTENCODING_KOI8,
wxFONTENCODING_KOI8_U,
wxFONTENCODING_CP932,
wxFONTENCODING_CP936,
wxFONTENCODING_CP949,
@@ -115,6 +116,7 @@ static const wxChar* gs_encodingDescs[] =
wxTRANSLATE( "Celtic (ISO-8859-14)" ),
wxTRANSLATE( "Western European with Euro (ISO-8859-15)" ),
wxTRANSLATE( "KOI8-R" ),
wxTRANSLATE( "KOI8-U" ),
wxTRANSLATE( "Windows Japanese (CP 932)" ),
wxTRANSLATE( "Windows Chinese Simplified (CP 936)" ),
wxTRANSLATE( "Windows Korean (CP 949)" ),
@@ -158,6 +160,7 @@ static const wxChar* gs_encodingNames[] =
wxT( "iso-8859-14" ),
wxT( "iso-8859-15" ),
wxT( "koi8-r" ),
wxT( "koi8-u" ),
wxT( "windows-932" ),
wxT( "windows-936" ),
wxT( "windows-949" ),
@@ -517,14 +520,17 @@ wxFontMapperBase::NonInteractiveCharsetToEncoding(const wxString& charset)
encoding = wxFONTENCODING_EUC_JP;
}
else if ( cs == wxT("KOI8-R") ||
cs == wxT("KOI8-U") ||
cs == wxT("KOI8-RU") )
{
// although koi8-ru is not strictly speaking the same as koi8-r,
// they are similar enough to make mapping it to koi8 better than
// not reckognizing it at all
// not recognizing it at all
encoding = wxFONTENCODING_KOI8;
}
else if ( cs == wxT("KOI8-U") )
{
encoding = wxFONTENCODING_KOI8_U;
}
else if ( cs.Left(3) == wxT("ISO") )
{
// the dash is optional (or, to be exact, it is not, but