Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[libmlocale] Handle bucketing for locales with conflicting data. Cont…
…ributes to JB#46546 Some locales like Russian and Hungarian have kind of conflicting data: exemplar character index list including both unaccented and accented vowel, while collation rules not including primary strenght difference. Earlier MLocale::indexBucket() returned the latter bucket for all strings starting with either unaccented or accented character, which was commonly wrong. Added a special case for checking if adjacent buckets are considered equal by the collator, and on such case mapping to latter one only if bucketed string starts with that. Meaning that other accents go to the earlier character, assumed to be the base bucket. Other option would have been doing some sanity check for exemplar character list and filtering out characters that don't have primary level difference to the earlier one.
- Loading branch information