+#ifdef wxNEEDS_UTF8_FOR_TEXT_DATAOBJ
+
+// FIXME-UTF8: we should be able to merge wchar_t and UTF-8 versions once we
+// have a way to get UTF-8 string (and its length) in both builds
+// without loss of efficiency (i.e. extra buffer copy/strlen call)
+
+#if wxUSE_UNICODE_WCHAR
+
+static inline wxMBConv& GetConv(const wxDataFormat& format)
+{
+ // use UTF8 for wxDF_UNICODETEXT and UCS4 for wxDF_TEXT
+ return format == wxDF_UNICODETEXT ? wxConvUTF8 : wxConvLibc;
+}