Remove useless fallback from wxLocale::Init()

There is no need to try setting "loc.UTF-8" and "loc.UTF8" when we had
just called wxSetlocaleTryUTF8() which tried these variants and also
their lower-case equivalents already.
This commit is contained in:
Vadim Zeitlin
2021-02-27 17:52:08 +01:00
parent 04ea7b552a
commit 0aba9fe112

View File

@@ -471,26 +471,6 @@ bool wxLocale::Init(int language, int flags)
retloc = wxSetlocaleTryUTF8(LC_ALL, langOnly);
}
#if wxUSE_FONTMAP
// some systems (e.g. FreeBSD and HP-UX) don't have xx_YY aliases but
// require the full xx_YY.encoding form, so try using UTF-8 because this is
// the only thing we can do generically
//
// TODO: add encodings applicable to each language to the lang DB and try
// them all in turn here
if ( !retloc )
{
const wxChar **names =
wxFontMapperBase::GetAllEncodingNames(wxFONTENCODING_UTF8);
while ( *names )
{
retloc = wxSetlocale(LC_ALL, locale + wxS('.') + *names++);
if ( retloc )
break;
}
}
#endif // wxUSE_FONTMAP
if ( !retloc )
{
// Some C libraries (namely glibc) still use old ISO 639,