fixing an incorrect conversion path from utf8 to plain ascii instead of unicode, closes #9629

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54369 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2008-06-26 07:19:05 +00:00
parent 5aae8198c0
commit d89af57a1a

View 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 )