dadap / flingon-assister

A port of boQwI' to Flutter
Apache License 2.0
7 stars 5 forks source link

Canonicalize accented German characters #19

Closed dadap closed 6 years ago

dadap commented 6 years ago

Dart does not support normalized Unicode string comparisons: https://github.com/dart-lang/sdk/issues/26502

Because of this, substring searches involving composed German characters (ä, ö, or ü; ß should be unaffected) sometimes do not work properly. The database text and search queries should be normalized before searching to avoid problems.

It might make sense to normalize to NFD (or possibly NFKD, though I struggle to think of examples where the difference would matter), so that operations like toLowerCase() can work. If a library with suitable normalization code can't be identified, it ought to be sufficient to just hard code a special-cased normalization for the particular German characters that are problematic.