Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.10.1, 5.15.2
-
None
Description
QCollatorSortKey doesn't work for one character strings. Problem is that in QCollator::sortKey() in qcollator_mac.cpp the status returned by UCGetCollationKey is kCollateBufferTooSmall and not kUCOutputBufferTooSmall. This was determined experimentally on a macOS 10.13.3 system. Changing the conditional to call UCGetCollationKey again if the initial buffer is too small to the following seems to fix the problem:
if (status == kUCOutputBufferTooSmall || status == kCollateBufferTooSmall) {
Attachments
Issue Links
- relates to
-
QTBUG-58737 QCollatorSortKey fails on macOS and Windows
-
- Closed
-
-
QTBUG-88704 QCollatorSortKey is not working properly without ICU support
-
- In Progress
-
-
QTBUG-108756 QCollatorSortKey gives wrong compare result
-
- Closed
-
Gerrit Reviews
For Gerrit Dashboard: QTBUG-67490 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
590290,7 | QCollator/Darwin: fix handling of UCGetCollationKey() return status | dev | qt/qtbase | Status: NEW | -1 | 0 |
590291,5 | QCollator/Darwin: implement support for sort keys for the C locale | dev | qt/qtbase | Status: NEW | +2 | +1 |