From 4c75209fc3cd4b7f9e2698949e73b64341b56aef Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Sun, 27 Aug 2006 09:29:25 +0000 Subject: [PATCH] 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 --- src/common/strconv.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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; -- 2.45.2