X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/489468feaa08b8f504735eecca522fb8d0f825d2..bb69632a56a827bed4cfae842bfffa88259ac1aa:/src/osx/carbon/dataobj.cpp diff --git a/src/osx/carbon/dataobj.cpp b/src/osx/carbon/dataobj.cpp index cdec68b05d..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/mac/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 )