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
This commit is contained in:
Vadim Zeitlin
2002-11-11 20:40:30 +00:00
parent 9e0bac7652
commit bd126f0e8f

View File

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