X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ac11db3a7717f6b07b1283b3433222cee93e3ac2..a3e9caa2b55fcc62e0ac8262a45ee83d0c6ce453:/src/common/strconv.cpp diff --git a/src/common/strconv.cpp b/src/common/strconv.cpp index dad4598c23..9abd03c445 100644 --- a/src/common/strconv.cpp +++ b/src/common/strconv.cpp @@ -78,7 +78,7 @@ #define TRACE_STRCONV _T("strconv") -#ifdef SIZEOF_WCHAR_T == 2 +#if SIZEOF_WCHAR_T == 2 #define WC_UTF16 #endif @@ -527,7 +527,7 @@ size_t wxMBConvUTF7::WC2MB(char *buf, const wchar_t *psz, size_t n) const { // BASE64 encode string unsigned int lsb, d, l; - for (d = 0, l = 0;; psz++) + for (d = 0, l = 0; /*nothing*/; psz++) { for (lsb = 0; lsb < 2; lsb ++) { @@ -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) @@ -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;