more DBCS-related changes (patch 481898)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12528 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -564,6 +564,25 @@ wxFontEncoding wxFontMapper::CharsetToEncoding(const wxString& charset,
|
|||||||
encoding = (wxFontEncoding)value;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1295,11 +1295,31 @@ wxFontEncoding wxLocale::GetSystemEncoding()
|
|||||||
#ifdef __WIN32__
|
#ifdef __WIN32__
|
||||||
UINT codepage = ::GetACP();
|
UINT codepage = ::GetACP();
|
||||||
|
|
||||||
// wxWindows only knows about CP1250-1257
|
// wxWindows only knows about CP1250-1257, 932, 936, 949, 950
|
||||||
if ( codepage >= 1250 && codepage <= 1257 )
|
if ( codepage >= 1250 && codepage <= 1257 )
|
||||||
{
|
{
|
||||||
return (wxFontEncoding)(wxFONTENCODING_CP1250 + codepage - 1250);
|
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
|
#elif defined(__UNIX_LIKE__) && wxUSE_FONTMAP
|
||||||
wxString encname = GetSystemEncodingName();
|
wxString encname = GetSystemEncodingName();
|
||||||
if ( !encname.empty() )
|
if ( !encname.empty() )
|
||||||
|
Reference in New Issue
Block a user