From: Václav Slavík Date: Sun, 27 Aug 2006 09:29:25 +0000 (+0000) Subject: made wxCSConv fall back to iso-8859-1 if wxFONTENCODING_SYSTEM is specified and wxLoc... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/4c75209fc3cd4b7f9e2698949e73b64341b56aef made wxCSConv fall back to iso-8859-1 if wxFONTENCODING_SYSTEM is specified and wxLocale cannot be used to determine the default charset because wxUSE_INTL=0 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40864 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/strconv.cpp b/src/common/strconv.cpp index 97b58b2497..52f1a41c17 100644 --- a/src/common/strconv.cpp +++ b/src/common/strconv.cpp @@ -3499,14 +3499,17 @@ void wxCSConv::CreateConvIfNeeded() const { wxCSConv *self = (wxCSConv *)this; // const_cast -#if wxUSE_INTL // if we don't have neither the name nor the encoding, use the default // encoding for this system if ( !m_name && m_encoding == wxFONTENCODING_SYSTEM ) { +#if wxUSE_INTL self->m_name = wxStrdup(wxLocale::GetSystemEncodingName()); - } +#else + // fallback to some reasonable default: + self->m_encoding = wxFONTENCODING_ISO8859_1; #endif // wxUSE_INTL + } self->m_convReal = DoCreate(); self->m_deferred = false;