From 5707316c9cbc2b44bb6b0246d766e5bb0cfdc2e7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Sun, 2 Sep 2001 22:44:00 +0000 Subject: [PATCH] applied utf-8 fix patch git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11545 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/fontmap.cpp | 4 ++-- src/common/wxchar.cpp | 3 ++- src/unix/fontutil.cpp | 6 ++---- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/common/fontmap.cpp b/src/common/fontmap.cpp index 1b981f40e0..21a3e219e6 100644 --- a/src/common/fontmap.cpp +++ b/src/common/fontmap.cpp @@ -161,8 +161,8 @@ static const wxChar* gs_encodingNames[] = wxT( "windows-1256" ), wxT( "windows-1257" ), wxT( "windows-437" ), - wxT( "utf7" ), - wxT( "utf8" ), + wxT( "utf-7" ), + wxT( "utf-8" ), }; // ---------------------------------------------------------------------------- diff --git a/src/common/wxchar.cpp b/src/common/wxchar.cpp index d404a98cb8..72a879991f 100644 --- a/src/common/wxchar.cpp +++ b/src/common/wxchar.cpp @@ -105,7 +105,8 @@ bool WXDLLEXPORT wxOKlibc() // this is UTF-8 allright, check whether that's what we want char *cur_locale = setlocale(LC_CTYPE, NULL); if ((strlen(cur_locale) < 4) || - (strcasecmp(cur_locale + strlen(cur_locale) - 4, "utf8"))) { + (strcasecmp(cur_locale + strlen(cur_locale) - 4, "utf8")) || + (strcasecmp(cur_locale + strlen(cur_locale) - 5, "utf-8"))) { // nope, don't use libc conversion return FALSE; } diff --git a/src/unix/fontutil.cpp b/src/unix/fontutil.cpp index 9411fc8df6..f190de22b6 100644 --- a/src/unix/fontutil.cpp +++ b/src/unix/fontutil.cpp @@ -192,16 +192,14 @@ bool wxGetNativeFontEncoding(wxFontEncoding encoding, break; case wxFONTENCODING_UTF8: - // FIXME: this is probably false, but this is how they are called on - // my system and I don't know what the standard XFLD is (VZ) - info->xregistry = wxT("iso646.1991"); + info->xregistry = wxT("iso10646"); info->xencoding = wxT("*"); break; case wxFONTENCODING_KOI8: info->xregistry = wxT("koi8"); - // we don't make distinction between koi8-r and koi8-u (so far) + // we don't make distinction between koi8-r, koi8-u and koi8-ru (so far) info->xencoding = wxT("*"); break; -- 2.45.2