use wxConvLocal for wxFONTENCODING_SYSTEM/DEFAULT in wxConvertToGTK()

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38663 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2006-04-10 23:53:09 +00:00
parent d0311dd366
commit 12bc5f9ad2

View 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);