Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.13.0 RC 1
-
None
-
-
570fb55a334d77959ed158fc55ac66814bd33f15 (qt/qtbase/5.13)
Description
In q_loadCallback(val event) :
if (readyState == 4) { // done reply->setReplyAttributes(xhr["data-handler"].as<quintptr>(), status, statusText); if (!responseString.isEmpty()) reply->dataReceived( responseString.toUtf8(), responseString.size()); }
Actually, responseString.toUtf8() may have a different size than responseString if there are some Unicode characters in responseString. so we need to pass the size of the array, not the string itself. Here is the fix:
if (readyState == 4) { // done reply->setReplyAttributes(xhr["data-handler"].as<quintptr>(), status, statusText); if (!responseString.isEmpty()) { QByteArray responseStringArray = responseString.toUtf8(); reply->dataReceived(responseStringArray, responseStringArray.size()); } }
Attachments
For Gerrit Dashboard: QTBUG-76212 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
264150,6 | wasm: fix wide character data download | 5.13 | qt/qtbase | Status: MERGED | +2 | 0 |