+ wxCharBuffer buffer = GetConv(format).cWX2MB( GetText().c_str() );
+
+ return buffer ? strlen( buffer ) : 0;
+}
+
+bool wxTextDataObject::GetDataHere(const wxDataFormat& format, void *buf) const
+{
+ if ( !buf )
+ return false;
+
+ wxCharBuffer buffer = GetConv(format).cWX2MB( GetText().c_str() );
+ if ( !buffer )
+ return false;
+
+ memcpy( (char*) buf, buffer, GetDataSize(format) );
+ // strcpy( (char*) buf, buffer );
+
+ return true;
+}
+
+bool wxTextDataObject::SetData(const wxDataFormat& format,
+ size_t WXUNUSED(len), const void *buf)
+{
+ if ( buf == NULL )
+ return false;
+
+ wxWCharBuffer buffer = GetConv(format).cMB2WX( (const char*)buf );
+
+ SetText( buffer );
+
+ return true;
+}
+
+#else // wxUSE_UNICODE_UTF8
+
+size_t wxTextDataObject::GetDataSize(const wxDataFormat& format) const
+{
+ if ( format == wxDF_UNICODETEXT || wxLocaleIsUtf8 )