]> git.saurik.com Git - wxWidgets.git/commitdiff
fixing an incorrect conversion path from utf8 to plain ascii instead of unicode,...
authorStefan Csomor <csomor@advancedconcepts.ch>
Thu, 26 Jun 2008 07:19:05 +0000 (07:19 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Thu, 26 Jun 2008 07:19:05 +0000 (07:19 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54369 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/osx/carbon/dataobj.cpp

index 3b9de3922355a0f3c56d5a21dfb79787cd2e33ae..0a4cb0f0be65766be8fb09cd2050e679dd609bbf 100644 (file)
@@ -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 )