]> git.saurik.com Git - wxWidgets.git/commitdiff
use wxConvLocal for wxFONTENCODING_SYSTEM/DEFAULT in wxConvertToGTK()
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 10 Apr 2006 23:53:09 +0000 (23:53 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 10 Apr 2006 23:53:09 +0000 (23:53 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38663 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/utilsgtk.cpp

index d0fd5c36a0b8145856ca5dda138b844b44e7cebd..35dd71d871ee0f46c3fee1fdd81611886a6e978f 100644 (file)
@@ -190,7 +190,16 @@ wxCharBuffer wxConvertToGTK(const wxString& s, wxFontEncoding enc)
         return wxCharBuffer(s);
     }
 
-    const wxWCharBuffer wbuf = wxCSConv(enc).cMB2WC(s);
+    wxWCharBuffer wbuf;
+    if ( enc == wxFONTENCODING_SYSTEM || enc == wxFONTENCODING_DEFAULT )
+    {
+        wbuf = wxConvLocal.cMB2WC(s);
+    }
+    else // another encoding, use generic conversion class
+    {
+        wbuf = wxCSConv(enc).cMB2WC(s);
+    }
+
     wxCharBuffer buf;
     if ( wbuf )
         buf = wxConvUTF8.cWC2MB(wbuf);