diff options
author | Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io> | 2021-08-04 14:35:02 +0200 |
---|---|---|
committer | Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io> | 2021-08-10 14:21:58 +0200 |
commit | 9bd2ab85ac88e88f29a11a7dedc8635261ca3484 (patch) | |
tree | b56a79f09fed62dd5a82e66a939a016c91044b63 /tests/auto/corelib/io | |
parent | 2f3b234d6c776099acef1b3d3ce4cdad25240677 (diff) |
QUrl: Fix Punycode handling for non-BMP codepoints
Iterate over Unicode codepoints instead of UTF-16 characters
when converting to/from Punycode as described in the specification.
Additionally reject strings with invalid surrogate pairs when
encoding to Punycode, reject strings with any encoded surrogates
when decoding.
Remove expected failure marking from the test for this issue
in tst_qurlinternal.
Fixes: QTBUG-95577
Pick-to: 6.2
Change-Id: I3dd68f95ada6d652e2fa5c0c3118dcfa0a5f4c4d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'tests/auto/corelib/io')
-rw-r--r-- | tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp b/tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp index f9876fc12e..7f2c506a1a 100644 --- a/tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp +++ b/tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp @@ -246,7 +246,6 @@ void tst_QUrlInternal::idna_testsuite() QString result; qt_punycodeEncoder(QStringView{unicode.points, numchars}, &result); - QEXPECT_FAIL("U+102F7", "QTBUG-95577: Non-BMP handling is broken", Continue); QCOMPARE(result.toLatin1(), punycode); QCOMPARE(qt_punycodeDecoder(result), QString::fromUtf16(unicode.points, numchars)); } |