Qt 6.8.3 with BlackBerry 10 (QNX 8 / ARMv7) patches
 
 
 
 
 
 
Go to file
Thiago Macieira d4c7da9a07 CBOR: fix sorting of UTF16-to-UTF16 strings
This amends commit 394788c68e (its
ChangeLog applies to this commit too). That fixed sorting of UTF8-to-
UTF16, but when adding more unit tests, I've discovered that some UTF-16
strings also sorted incorrectly. There were two problems:

First, we were assuming that we could rely on the UTF-16 length as a
proxy for the UTF-8 one, but that's not true for some cases:
* both 1-, 2- and 3-codepoint UTF-8 sequences are 1 codepoint
  in UTF-16, so some strings would have identical UTF-16 length
* 4-codepoint UTF-8 sequences shrink to 2-codepoint UTF-16 ones
  (2:1) but 3-codepoint UTF-8 sequences shrink to 1 (3:1), so
  some strings would be longer in UTF-16 but shorter in UTF-8.

Second, QtPrivate::compareStrings performs UTF-16 codepoint comparisons
not Unicode character ones, so surrogate pairs were sorting before
U+E000 to U+FFFF.

To fix all of this, we need to decode the UTF-16 string into UTF-32 and
calculate the length of that in UTF-8 to be sure we have the sorting
order right.

Since this is a slight behavior change with a performance penalty, I am
choosing to backport only to 6.7. The penalty mostly does not apply to
6.8 due to commit 61556627f2.

Pick-to: 6.7
Change-Id: If1bf59ecbe014b569ba1fffd17c4c4ddcc874aac
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-04-12 21:41:16 -07:00
.github/workflows Repair github action workflow 2021-11-10 18:57:33 +01:00
LICENSES Use canonical capitalization of Unicode-3.0 SPDX tag 2024-03-13 14:43:10 +00:00
bin cmake: Override generator for iOS projects to Xcode in qt-cmake.in 2024-03-18 22:34:48 +01:00
cmake CMake: qt_internal_add_test - fix BLACKLIST file handling 2024-04-13 08:18:36 +08:00
coin CMake: Allow configuring a minimal subset of examples to deploy 2024-03-19 18:22:16 +01:00
config.tests Correct license in config.test 2024-02-20 16:22:28 +01:00
dist Remove dist/README 2024-02-29 15:35:57 +01:00
doc Doc: Replace obsolete <acronym> with <abbr> html tags 2024-03-22 16:28:12 +01:00
examples Don't add any entry whose name doesn't start with a letter 2024-04-11 00:12:19 +02:00
lib
libexec CMake: Allow building all examples as standalone just like tests 2024-03-14 11:44:16 +01:00
mkspecs qmake: Improve Xcode projects for single SDK builds on Apple platforms 2024-04-03 17:17:11 +02:00
qmake QMake: make it error out if it cannot open output files 2024-03-27 04:24:11 +01:00
src CBOR: fix sorting of UTF16-to-UTF16 strings 2024-04-12 21:41:16 -07:00
tests CBOR: fix sorting of UTF16-to-UTF16 strings 2024-04-12 21:41:16 -07:00
util cmake: Rename QT_UIKIT_SDK to QT_APPLE_SDK 2024-03-18 19:04:14 +01:00
.cmake.conf Remove year from generic Qt copyright information 2024-02-14 09:30:07 +00:00
.gitattributes Give batch files CRLF line endings 2020-11-04 15:02:29 +00:00
.gitignore Git ignore Visual Studio CMake build directories 2023-11-24 23:42:05 +01:00
.lgtm.yml Skip LGTM analysis for the bootstrap library and tools 2020-07-16 01:04:34 +02:00
.tag
CMakeLists.txt cmake: add _extra_files IDE target from heuristics 2024-04-12 08:36:01 +08:00
config_help.txt Add support for using an inline namespaces for -qtnamespace 2024-04-03 17:17:11 +02:00
configure Change configure license 2024-02-02 15:23:02 +00:00
configure.bat configure.bat: Fix errors on Windows 2024-03-05 11:56:24 +01:00
configure.cmake CMake: Bail out on configuration with FEATURE_cxx20 and MSVC 2019 2024-03-27 06:55:35 +01:00
dependencies.yaml Re-add dependencies.yaml now that qt5.git wip/qt6 builds fine 2019-09-18 13:19:31 +02:00
licenseRule.json Correct wording in licenseRule.json 2024-04-10 21:01:06 +02:00
qt_cmdline.cmake Add support for using an inline namespaces for -qtnamespace 2024-04-03 17:17:11 +02:00