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 09:57:10 +0000
commit8cd40d55038ea6e9994b356e89ec28c12a1f3692 (patch)
tree1f9bc81892072be24dcea05c345e62634a1384fc
parent402cfde34ff1d4566c06fdba25c04d729fd9b8d4 (diff)
downloadqtscript-8cd40d55038ea6e9994b356e89ec28c12a1f3692.tar.gz
Fix xml output to have valid UTF-8
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>
-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 43c00f4..cce3c1b 100644
--- a/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp
+++ b/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp
@@ -277,7 +277,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)