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/branches/WX_2_8_BRANCH@54368 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2008-06-26 07:09:17 +00:00
parent 4a0b9504ee
commit 185903c018

View File

@@ -421,6 +421,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 )