]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/carbon/dataobj.cpp
minor fixes; replace references to Windows95 with references to wxMSW where possible
[wxWidgets.git] / src / osx / carbon / dataobj.cpp
index 3b9de3922355a0f3c56d5a21dfb79787cd2e33ae..e58a05f0b5a0f7f3d76f9b294a153c03ce8ce5b4 100644 (file)
@@ -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 <QuickTime/QuickTime.h>
@@ -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 )