git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13840
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
facename = tokenizer.GetNextToken();
wxString tmp = tokenizer.GetNextToken();
facename = tokenizer.GetNextToken();
wxString tmp = tokenizer.GetNextToken();
- // default charset (don't use DEFAULT_CHARSET though because of subtle
- // Windows 9x/NT differences in handling it)
+ // default charset: but don't use DEFAULT_CHARSET here because it might
+ // be different from the machine on which the file we had read this
+ // encoding desc from was created
charset = ANSI_CHARSET;
}
else
charset = ANSI_CHARSET;
}
else
wxString s;
s << (long)encoding << _T(';') << facename;
wxString s;
s << (long)encoding << _T(';') << facename;
+
+ // ANSI_CHARSET is assumed anyhow
if ( charset != ANSI_CHARSET )
{
s << _T(';') << charset;
if ( charset != ANSI_CHARSET )
{
s << _T(';') << charset;
// although this function is supposed to return an exact match, do do
// some mappings here for the most common case of "standard" encoding
case wxFONTENCODING_SYSTEM:
// although this function is supposed to return an exact match, do do
// some mappings here for the most common case of "standard" encoding
case wxFONTENCODING_SYSTEM:
+ info->charset = DEFAULT_CHARSET;
+ break;
+
case wxFONTENCODING_ISO8859_1:
case wxFONTENCODING_ISO8859_15:
case wxFONTENCODING_CP1252:
case wxFONTENCODING_ISO8859_1:
case wxFONTENCODING_ISO8859_15:
case wxFONTENCODING_CP1252:
- // JACS: Silently using ANSI_CHARSET
- // apparently works for Chinese Windows. Assume it works
- // for all/most other languages.
- //wxFAIL_MSG(wxT("unsupported charset"));
- // fall through
+ // assume the system charset
+ fontEncoding = wxFONTENCODING_SYSTEM;
+ break;
case ANSI_CHARSET:
fontEncoding = wxFONTENCODING_CP1252;
case ANSI_CHARSET:
fontEncoding = wxFONTENCODING_CP1252;