+
+ if ( format == wxDF_UNICODETEXT || wxLocaleIsUtf8 )
+ {
+ // normally the data is in UTF-8 so we could use FromUTF8Unchecked()
+ // but it's not absolutely clear what GTK+ does if the clipboard data
+ // is not in UTF-8 so do an extra check for tranquility, it shouldn't
+ // matter much if we lose a bit of performance when pasting from
+ // clipboard
+ m_text = wxString::FromUTF8(buf, len);
+ }
+ else // wxDF_TEXT, convert from current (non-UTF8) locale
+ {
+ m_text = wxConvLocal.cMB2WC(buf, len, NULL);
+ }
+