From 73597f8affdbf871f740aa7abb92affe657bf606 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 21 Jul 2008 03:35:15 +0000 Subject: [PATCH] wxDF_UNICODETEXT shouldn't be supported at all in ANSI build git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54741 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/dataobj.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/gtk/dataobj.cpp b/src/gtk/dataobj.cpp index 50ef7fdc80..dbe0952d50 100644 --- a/src/gtk/dataobj.cpp +++ b/src/gtk/dataobj.cpp @@ -81,10 +81,13 @@ void wxDataFormat::SetType( wxDataFormatId type ) m_format = g_textAtom; else if (m_type == wxDF_TEXT) m_format = g_altTextAtom; -#else - if (m_type == wxDF_TEXT || m_type == wxDF_UNICODETEXT) +#else // !wxUSE_UNICODE + // notice that we don't map wxDF_UNICODETEXT to g_textAtom here, this + // would lead the code elsewhere to treat data objects with this format as + // containing UTF-8 data which is not true + if (m_type == wxDF_TEXT) m_format = g_textAtom; -#endif +#endif // wxUSE_UNICODE/!wxUSE_UNICODE else if (m_type == wxDF_BITMAP) m_format = g_pngAtom; -- 2.45.2