Support encodings in wxGTK_CONV_BACK() in the same way as we do it in
wxGTK_CONV(), i.e. return the string containing text in ISO-8859-1 encoding and not UTF-8 if the controls font was set to have ISO-8859-1 encoding git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44577 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -209,6 +209,17 @@ wxCharBuffer wxConvertToGTK(const wxString& s, wxFontEncoding enc)
|
||||
return wxConvUTF8.cWC2MB(wbuf);
|
||||
}
|
||||
|
||||
wxCharBuffer wxConvertFromGTK(const wxString& s, wxFontEncoding enc)
|
||||
{
|
||||
// this conversion should never fail as GTK+ always uses UTF-8 internally
|
||||
// so there are no complications here
|
||||
const wxWCharBuffer wbuf(wxConvUTF8.cMB2WC(s));
|
||||
if ( enc == wxFONTENCODING_SYSTEM )
|
||||
return wxConvUI->cWC2MB(wbuf);
|
||||
|
||||
return wxCSConv(enc).cWC2MB(wbuf);
|
||||
}
|
||||
|
||||
#endif // !wxUSE_UNICODE
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user