fix bug with wxCSConv("ASCII")

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@54703 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-07-19 01:45:38 +00:00
parent c64b101c34
commit 23c883b71a

View File

@@ -3205,6 +3205,16 @@ wxCSConv::wxCSConv(const wxChar *charset)
#if wxUSE_FONTMAP #if wxUSE_FONTMAP
m_encoding = wxFontMapperBase::GetEncodingFromName(charset); m_encoding = wxFontMapperBase::GetEncodingFromName(charset);
if ( m_encoding == wxFONTENCODING_MAX )
{
// set to unknown/invalid value
m_encoding = wxFONTENCODING_SYSTEM;
}
else if ( m_encoding == wxFONTENCODING_DEFAULT )
{
// wxFONTENCODING_DEFAULT is same as US-ASCII in this context
m_encoding = wxFONTENCODING_ISO8859_1;
}
#else #else
m_encoding = wxFONTENCODING_SYSTEM; m_encoding = wxFONTENCODING_SYSTEM;
#endif #endif