+ int size = data->GetDataSize( format );
+
+ if (size == 0) return;
+
+ void *d = malloc(size);
+
+ // Text data will be in UTF8 in Unicode mode.
+ data->GetDataHere( selection_data->target, d );
+
+#ifdef __WXGTK20__
+ // NB: GTK+ requires special treatment of UTF8_STRING data, the text
+ // would show as UTF-8 data interpreted as latin1 (?) in other
+ // GTK+ apps if we used gtk_selection_data_set()
+ if (format == wxDataFormat(wxDF_UNICODETEXT))