X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ccaa848d6d376072af26c971a212580cf46affc5..bf9ce2abdf465110ca83469c1b336b056ae8ec72:/src/common/strconv.cpp diff --git a/src/common/strconv.cpp b/src/common/strconv.cpp index 91958d6e61..31dc602f35 100644 --- a/src/common/strconv.cpp +++ b/src/common/strconv.cpp @@ -2890,6 +2890,16 @@ wxCSConv::wxCSConv(const wxString& charset) #if wxUSE_FONTMAP 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 m_encoding = wxFONTENCODING_SYSTEM; #endif