Quick-Event / quickbox

Quick Event - Orienteering Software
GNU General Public License v2.0
52 stars 41 forks source link

Improve support for Cyrillic-based languages #911

Open sakhnik opened 1 year ago

sakhnik commented 1 year ago

Currently, QuickEvent is fine-tuned for Latin-based scripts. Characters are stripped of diacritics and narrowed down to 7-bit ASCII. This makes filtering, searching and other string operations typo-tolerant. But the collation algorithm fails dramatically with any other script, for instance, Cyrillic. When I try to filter names, a match is found in every row. I ended up with a temporary fix to just compare strings ordinarily, and this works just fine: 6177c5e. But a more robust solution acceptable for anyone could be a choice of either the Latin-based collation or the generic one. This could be a configuration option or automatic selection based on the current locale, maybe.

fvacek commented 1 year ago

Can you provide some table, how ti narrow Cyrillic characters to 7-bit, or do you think that convert to lower-case is enough for you?

sakhnik commented 1 year ago

I believe that converting to lowercase would be perfect for us.