applied DBCS patch
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12363 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
570cb8cb08
commit
bc4e6fcdc3
@ -63,6 +63,10 @@ All (GUI):
|
||||
- wxDirSelector() added (Paul A. Thiessen)
|
||||
- wxGrid cell editing veto support (Roger Gammans)
|
||||
|
||||
wxMSW:
|
||||
|
||||
- support for the DBCS fonts (CP 932, 936, 949, 950) (Nathan Cook)
|
||||
|
||||
wxHTML:
|
||||
|
||||
- new HTML parser with correct parsing of character entities and fixes
|
||||
|
@ -54,6 +54,10 @@ enum wxFontEncoding
|
||||
wxFONTENCODING_CP866, // and another one
|
||||
// and for Windows
|
||||
wxFONTENCODING_CP874, // WinThai
|
||||
wxFONTENCODING_CP932, // Japanese (shift-JIS)
|
||||
wxFONTENCODING_CP936, // Chiniese simplified (GB)
|
||||
wxFONTENCODING_CP949, // Korean (Hangul charset)
|
||||
wxFONTENCODING_CP950, // Chinese (traditional - Big5)
|
||||
wxFONTENCODING_CP1250, // WinLatin2
|
||||
wxFONTENCODING_CP1251, // WinCyrillic
|
||||
wxFONTENCODING_CP1252, // WinLatin1
|
||||
|
@ -88,6 +88,10 @@ static wxFontEncoding gs_encodings[] =
|
||||
wxFONTENCODING_ISO8859_14,
|
||||
wxFONTENCODING_ISO8859_15,
|
||||
wxFONTENCODING_KOI8,
|
||||
wxFONTENCODING_CP932,
|
||||
wxFONTENCODING_CP936,
|
||||
wxFONTENCODING_CP949,
|
||||
wxFONTENCODING_CP950,
|
||||
wxFONTENCODING_CP1250,
|
||||
wxFONTENCODING_CP1251,
|
||||
wxFONTENCODING_CP1252,
|
||||
@ -120,6 +124,10 @@ static const wxChar* gs_encodingDescs[] =
|
||||
wxTRANSLATE( "Celtic (ISO-8859-14)" ),
|
||||
wxTRANSLATE( "Western European with Euro (ISO-8859-15)" ),
|
||||
wxTRANSLATE( "KOI8-R" ),
|
||||
wxTRANSLATE( "Windows Japanese (CP 932)" ),
|
||||
wxTRANSLATE( "Windows Chiniese Simplified (CP 936)" ),
|
||||
wxTRANSLATE( "Windows Korean (CP 949)" ),
|
||||
wxTRANSLATE( "Windows Chinese Traditional (CP 950)" ),
|
||||
wxTRANSLATE( "Windows Central European (CP 1250)" ),
|
||||
wxTRANSLATE( "Windows Cyrillic (CP 1251)" ),
|
||||
wxTRANSLATE( "Windows Western European (CP 1252)" ),
|
||||
@ -152,6 +160,10 @@ static const wxChar* gs_encodingNames[] =
|
||||
wxT( "iso-8859-14" ),
|
||||
wxT( "iso-8859-15" ),
|
||||
wxT( "koi8-r" ),
|
||||
wxT( "windows-932" ),
|
||||
wxT( "windows-936" ),
|
||||
wxT( "windows-949" ),
|
||||
wxT( "windows-950" ),
|
||||
wxT( "windows-1250" ),
|
||||
wxT( "windows-1251" ),
|
||||
wxT( "windows-1252" ),
|
||||
|
@ -124,6 +124,25 @@ bool wxGetNativeFontEncoding(wxFontEncoding encoding,
|
||||
break;
|
||||
|
||||
#if !defined(__WIN16__) && !defined(__WXMICROWIN__)
|
||||
|
||||
// The following four fonts are multi-byte charsets
|
||||
case wxFONTENCODING_CP932:
|
||||
info->charset = SHIFTJIS_CHARSET;
|
||||
break;
|
||||
|
||||
case wxFONTENCODING_CP936:
|
||||
info->charset = GB2312_CHARSET;
|
||||
break;
|
||||
|
||||
case wxFONTENCODING_CP949:
|
||||
info->charset = HANGUL_CHARSET;
|
||||
break;
|
||||
|
||||
case wxFONTENCODING_CP950:
|
||||
info->charset = CHINESEBIG5_CHARSET;
|
||||
break;
|
||||
|
||||
// The rest are single byte encodings
|
||||
case wxFONTENCODING_CP1250:
|
||||
info->charset = EASTEUROPE_CHARSET;
|
||||
break;
|
||||
@ -155,6 +174,8 @@ bool wxGetNativeFontEncoding(wxFontEncoding encoding,
|
||||
case wxFONTENCODING_CP874:
|
||||
info->charset = THAI_CHARSET;
|
||||
break;
|
||||
|
||||
|
||||
#endif // !Win16
|
||||
|
||||
case wxFONTENCODING_CP437:
|
||||
@ -245,6 +266,23 @@ wxFontEncoding wxGetFontEncFromCharSet(int cs)
|
||||
case THAI_CHARSET:
|
||||
fontEncoding = wxFONTENCODING_CP437;
|
||||
break;
|
||||
|
||||
case SHIFTJIS_CHARSET:
|
||||
fontEncoding = wxFONTENCODING_CP932;
|
||||
break;
|
||||
|
||||
case GB2312_CHARSET:
|
||||
fontEncoding = wxFONTENCODING_CP936;
|
||||
break;
|
||||
|
||||
case HANGUL_CHARSET:
|
||||
fontEncoding = wxFONTENCODING_CP949;
|
||||
break;
|
||||
|
||||
case CHINESEBIG5_CHARSET:
|
||||
fontEncoding = wxFONTENCODING_CP950;
|
||||
break;
|
||||
|
||||
#endif // Win32
|
||||
|
||||
case OEM_CHARSET:
|
||||
|
Loading…
Reference in New Issue
Block a user