try to deal more gracefully (than simply not showing anything at all) with invalid UTF-8 strings (e.g. ISO-8859-1 strings inserted in controls with default (UTF-8) font
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40800 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -846,7 +846,9 @@ void wxTextCtrl::SetValue( const wxString &value )
|
||||
const wxCharBuffer buffer(wxGTK_CONV_ENC(value, GetTextEncoding()));
|
||||
if ( !buffer )
|
||||
{
|
||||
// what else can we do? at least don't crash...
|
||||
// see comment in WriteText() as to why we must warn the user about
|
||||
// this
|
||||
wxLogWarning(_("Failed to set text in the text control."));
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user