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
This commit is contained in:
Václav Slavík
2006-08-27 09:29:25 +00:00
parent a0afe18fcf
commit 4c75209fc3

View File

@@ -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;