Port bug 1937541 - Migrate collation to ICU4X
Categories
(Thunderbird :: Upstream Synchronization, task)
Tracking
(Not tracked)
People
(Reporter: mkmelin, Assigned: darktrojan)
References
Details
Attachments
(1 external file)
Port bug 1937541. Builds are failing.
Comment 1•7 months ago
•
|
||
Previously: bug 1971367.
The new APIs relevant to the comm-central build failures are mozilla::intl::AppCollator::CompareBase and mozilla::intl::AppCollator::Compare. The former is provided to retain old and likely wrong semantics. The latter is the one that makes more sense to use.
With CompareBase, the relative order of case and accent differences depends on factors other than the string content, in the case of stable sort what order the input was in before sorting and in case of other kinds of sorting algorithms also on the specifics of the sorting algorithm.
My theory is that pre-existing use of the "base" sensitivity comes either from the semantics of an ancient Windows API or from a misunderstanding somewhere along the way.
Comment 2•7 months ago
|
||
See bug 2022459.
Comment 3•7 months ago
|
||
Filed bug 2022463 about sorting at "base" sensitivity via JS in comm-central.
| Assignee | ||
Comment 4•7 months ago
|
||
I think it's easiest to just stop using collation keys (which Collator no longer has functions for)
and just compare string values.
Comment 5•7 months ago
|
||
// FIXME: This doesn't do a numeric comparison, but it should.
It would make sense to add a collator configuration to AppCollator that has "variant" sensitivity and numeric mode turned on. (Perhaps that should even be the default for Compare and there should be a non-numeric config for sqlite to avoid changing behavior there.)
Updated•7 months ago
|
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/0a9b4084679a
Port bug 1937541 - Migrate collation to ICU4X. r=mkmelin
| Reporter | ||
Updated•7 months ago
|
Comment 7•7 months ago
|
||
(In reply to Henri Sivonen (:hsivonen) from comment #5)
// FIXME: This doesn't do a numeric comparison, but it should.
It would make sense to add a collator configuration to AppCollator that has "variant" sensitivity and numeric mode turned on. (Perhaps that should even be the default for
Compareand there should be a non-numeric config for sqlite to avoid changing behavior there.)
| Assignee | ||
Comment 8•7 months ago
|
||
Thanks Henri, I wasn't really expecting it to get fixed at that level, but I'll take it! The code in question isn't used in production yet, so I wasn't worried about it being broken for a while.
| Comment hidden (Intermittent Failures Robot) |
| Assignee | ||
Updated•7 months ago
|
Description
•