From fe2ab724de8bf9bef92f2e889efd6546ac828743 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 27 Feb 2017 21:58:17 -0800 Subject: tst_utf8: Fix one of the overlong sequences to be what we meant C0 to DF take one continuation byte; E0 to EF take two. It's invalid UTF-8 anyway, but at least this is what the test row meant: overlong sequence with 3 bytes of what should have been two. This updates the comment to match the character that we were actually testing. Change-Id: I85a8bd6da2c44f52b4e3fffd14a75df2600487aa Reviewed-by: Edward Welbourne --- tests/auto/corelib/codecs/utf8/utf8data.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/auto/corelib') diff --git a/tests/auto/corelib/codecs/utf8/utf8data.cpp b/tests/auto/corelib/codecs/utf8/utf8data.cpp index 603ebbbcef..2267dc8514 100644 --- a/tests/auto/corelib/codecs/utf8/utf8data.cpp +++ b/tests/auto/corelib/codecs/utf8/utf8data.cpp @@ -85,10 +85,10 @@ void loadInvalidUtf8Rows() // overlong 6: xxxx:xxz0 xz00:0000 xz00:0000 xz00:0000 xz00:0001 xz00:0001 QTest::newRow("overlong-1-6") << QByteArray("\xFC\x80\x80\x80\x81\x81"); - // NBSP: U+00A0: 10 00 0000 + // U+0080: 10 00 0000 // proper encoding: xxz0:0010 xz00:0000 // overlong 3: xxxz:0000 xz00:0010 xz00:0000 - QTest::newRow("overlong-2-3") << QByteArray("\xC0\x82\x80"); + QTest::newRow("overlong-2-3") << QByteArray("\xE0\x82\x80"); // overlong 4: xxxx:z000 xz00:0000 xz00:0010 xz00:0000 QTest::newRow("overlong-2-4") << QByteArray("\xF0\x80\x82\x80"); // overlong 5: xxxx:xz00 xz00:0000 xz00:0000 xz00:0010 xz00:0000 -- cgit v1.2.3