summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Arve Sæther <jan-arve.saether@qt.io>2018-06-28 10:25:22 +0200
committerFrederik Gladhorn <frederik.gladhorn@qt.io>2018-07-11 11:50:07 +0000
commit527c985edae4a4e6a6f430bf0f7ec8d5bda30c6a (patch)
treecc380b2ceff87e999393607a7c54aa085d72cef7
parenta8ab54a935a8a12a0faa597e041424d481adb0e9 (diff)
downloadqtscript-5.6.tar.gz
Fix xml output to have valid UTF-85.6
Some datatags had characters outside the ASCII range. (This is discouraged). And when dumping the datatag to xml output we dumped the binary content of the data tag without encoding it from latin1 to utf-8. This meant that all characters in the range 0x80-0xff produced invalid utf-8 sequences. The solution is to encode the data tag as UTF-8. Change-Id: Iaaecc992b756836845bfb98429f20f1fb5e2b291 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io> (cherry picked from commit 1d2294735536c53fca8e56ed4b262c4bca6b4d29) Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
-rw-r--r--tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp b/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp
index 13668c6..fb95616 100644
--- a/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp
+++ b/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp
@@ -275,7 +275,7 @@ void tst_QScriptJSTestSuite::runTestFunction(int testIndex)
actual.toString(), expect.toString(),
relpath, lineNumber);
- QTest::newRow(description.toLatin1()) << rec;
+ QTest::newRow(description.toUtf8()) << rec;
}
}
if (!hasData)