X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1f0c8f31f407ecfce909060464c0ea655221cdab..689d801314845c6db093358a81c7879b672aa5e6:/src/osx/carbon/dataobj.cpp?ds=sidebyside diff --git a/src/osx/carbon/dataobj.cpp b/src/osx/carbon/dataobj.cpp index 3b9de39223..e58a05f0b5 100644 --- a/src/osx/carbon/dataobj.cpp +++ b/src/osx/carbon/dataobj.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Name: src/mac/carbon/dataobj.cpp +// Name: src/osx/carbon/dataobj.cpp // Purpose: implementation of wxDataObject class // Author: Stefan Csomor // Modified by: @@ -27,7 +27,7 @@ #include "wx/metafile.h" #include "wx/tokenzr.h" -#include "wx/osx/uma.h" +#include "wx/osx/private.h" #ifdef __DARWIN__ #include @@ -403,6 +403,11 @@ bool wxDataObject::GetFromPasteboard( void * pb ) flavorType = (CFStringRef)CFArrayGetValueAtIndex( flavorTypeArray, flavorIndex ); + // avoid utf8 being treated closer to plain-text than unicode by forcing a conversion + if ( UTTypeConformsTo(flavorType, CFSTR("public.utf8-plain-text") ) ) + { + flavorType = CFSTR("public.utf16-plain-text"); + } wxDataFormat flavorFormat( (wxDataFormat::NativeFormat) flavorType ); if ( dataFormat == flavorFormat )