From bd126f0e8fb05025de0197655a5206c3171e16c0 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 11 Nov 2002 20:40:30 +0000 Subject: [PATCH] use ISO8859-1 instead of UTF-8 in non Unicode build git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17838 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/intl.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/common/intl.cpp b/src/common/intl.cpp index 8de461ae2d..6e71405b98 100644 --- a/src/common/intl.cpp +++ b/src/common/intl.cpp @@ -1334,6 +1334,17 @@ wxFontEncoding wxLocale::GetSystemEncoding() wxFontEncoding enc = wxFontMapper::Get()-> CharsetToEncoding(encname, FALSE /* not interactive */); + // on some modern Linux systems (RedHat 8) the default system locale + // is UTF8 -- but it isn't supported by wxGTK in ANSI build at all so + // don't even try to use it in this case +#if !wxUSE_UNICODE + if ( enc == wxFONTENCODING_UTF8 ) + { + // the most similar supported encoding... + enc = wxFONTENCODING_ISO8859_1; + } +#endif // !wxUSE_UNICODE + // this should probably be considered as a bug in CharsetToEncoding(): // it shouldn't return wxFONTENCODING_DEFAULT at all - but it does it // for US-ASCII charset