X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/edef87c8274bd4cadcccc4ff107aeb1815e48460..06336f51bb5120c9ac23d66c6acd79ec7428f15f:/src/common/strconv.cpp?ds=inline diff --git a/src/common/strconv.cpp b/src/common/strconv.cpp index 0e3eb81df9..9abd03c445 100644 --- a/src/common/strconv.cpp +++ b/src/common/strconv.cpp @@ -2462,7 +2462,11 @@ wxCSConv::wxCSConv(const wxChar *charset) SetName(charset); } +#if wxUSE_FONTMAP + m_encoding = wxFontMapperBase::GetEncodingFromName(charset); +#else m_encoding = wxFONTENCODING_SYSTEM; +#endif } wxCSConv::wxCSConv(wxFontEncoding encoding) @@ -2525,7 +2529,7 @@ void wxCSConv::SetName(const wxChar *charset) #include "wx/hashmap.h" WX_DECLARE_HASH_MAP( wxFontEncoding, wxString, wxIntegerHash, wxIntegerEqual, - wxEncodingNameCache ) + wxEncodingNameCache ); static wxEncodingNameCache gs_nameCache; #endif @@ -2542,7 +2546,8 @@ wxMBConv *wxCSConv::DoCreate() const // check for the special case of ASCII or ISO8859-1 charset: as we have // special knowledge of it anyhow, we don't need to create a special // conversion object - if ( m_encoding == wxFONTENCODING_ISO8859_1 ) + if ( m_encoding == wxFONTENCODING_ISO8859_1 || + m_encoding == wxFONTENCODING_DEFAULT ) { // don't convert at all return NULL;