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-108756 QCollatorSortKey gives wrong compare result
- Reported