Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.3.2, 5.4.2, 5.6.0 Beta
-
None
-
mips64 single core CPU (KOMDIV-64), Debian GNU/Linux 8.2 (jessie)
-
434302eae1a0c5d3016fe07c7d343bdbad118a8a
Description
When trying to serialize QJsonObject containing non-latin (in our case: cyrillic) string as a value, QJsonDocument produces the corrupted result on the Big Endian platform.
Here is the results of running the attached test on MIPS-based platform.
********* Start testing of TestClass ********* Config: Using QtTest library 5.3.2, Qt 5.3.2 PASS : TestClass::initTestCase() PASS : TestClass::checkSerialize(latin) FAIL! : TestClass::checkSerialize(cyrillic) Compared values are not the same Actual (serializedJson): 7B 22 74 65 73 74 22 3A 22 E1 BC 84 E4 80 84 E3 B8 84 E3 88 84 E3 94 84 E4 80 84 E3 A8 84 E3 80 84 22 7D Expected (json) : 7B 22 74 65 73 74 22 3A 22 D0 9F D1 80 D0 BE D0 B2 D0 B5 D1 80 D0 BA D0 B0 22 7D Loc: [testclass.cpp(56)] PASS : TestClass::checkDeserialize(latin) PASS : TestClass::checkDeserialize(cyrillic) PASS : TestClass::cleanupTestCase() Totals: 5 passed, 1 failed, 0 skipped ********* Finished testing of TestClass *********
Same test works just fine on x86-64. I know this CPU may seem pretty exotic and rare, but it runs standard Debian MIPS distibution and I am pretty sure the problem will be reproducible on any Big Endian platform.
Attachments
For Gerrit Dashboard: QTBUG-50419 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
145822,2 | Fix non-Latin1 strings in QJsonDocument on big-endian platforms | 5.5 | qt/qtbase | Status: MERGED | +2 | 0 |