Details
-
Bug
-
Resolution: Out of scope
-
P2: Important
-
4.6.2
-
None
Description
Assuming Webkit has encoded the mimedata correctly, then Qt might not be decoding it correctly.
In the drag, the text coming from Webkit is UTF16, while Qt assumes it is UTF8.
The representation of the string will then be garbled with extra space or unknown chars, depending on platform.
If you know the text you are receiving is UTF16, then you can work around it (ref the example, droparea.cpp) by doing:
DropArea::dropEvent(), line 90
} else if (mimeData->hasText()) { setText(QTextCodec::codecForName("UTF-16")->toUnicode(mimeData->data("text/plain"))); setTextFormat(Qt::PlainText);