X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ccaa848d6d376072af26c971a212580cf46affc5..c3485a4eef3a3fb03f8a12784d6b35bb68471ea0:/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