applied utf-8 fix patch
authorVáclav Slavík <vslavik@fastmail.fm>
Sun, 2 Sep 2001 22:44:00 +0000 (22:44 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Sun, 2 Sep 2001 22:44:00 +0000 (22:44 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11545 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/fontmap.cpp
src/common/wxchar.cpp
src/unix/fontutil.cpp

index 1b981f40e0fca419598ab0c93c3ddee8ed4d79fc..21a3e219e6db7f951120e4a50d0ef05d6bd27340 100644 (file)
@@ -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" ),
 };
 
 // ----------------------------------------------------------------------------
index d404a98cb8a36fb3c0351d6505b87d8cd9596efd..72a879991f094e23cbe6b99bbbe5ea555e7897b6 100644 (file)
@@ -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;
     }
index 9411fc8df67349dba1539c427c3aa1f8b4feb719..f190de22b664af8416feb804b95ac3e6d929c8ef 100644 (file)
@@ -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;