diff --git a/src/gtk/textctrl.cpp b/src/gtk/textctrl.cpp index d300952a7f..9142eaa632 100644 --- a/src/gtk/textctrl.cpp +++ b/src/gtk/textctrl.cpp @@ -288,7 +288,11 @@ wxString wxTextCtrl::GetValue() const { gint len = gtk_text_get_length( GTK_TEXT(m_text) ); char *text = gtk_editable_get_chars( GTK_EDITABLE(m_text), 0, len ); +#if wxUSE_UNICODE tmp = wxString(text,*wxConv_current); +#else + tmp = text; +#endif g_free( text ); } else diff --git a/src/gtk1/textctrl.cpp b/src/gtk1/textctrl.cpp index d300952a7f..9142eaa632 100644 --- a/src/gtk1/textctrl.cpp +++ b/src/gtk1/textctrl.cpp @@ -288,7 +288,11 @@ wxString wxTextCtrl::GetValue() const { gint len = gtk_text_get_length( GTK_TEXT(m_text) ); char *text = gtk_editable_get_chars( GTK_EDITABLE(m_text), 0, len ); +#if wxUSE_UNICODE tmp = wxString(text,*wxConv_current); +#else + tmp = text; +#endif g_free( text ); } else