Match accented chars in ::findText()
When !caseSensitive
is passed and the search term is pure Ascii.
This makes possible that simple ascii search terms can match on their accented and other diacritics counterparts. Examples:
- "arbol" matches "árbol" (spanish)
- "resume" matches "résumé" (french)
- "Ausgleichslosung" matches "Ausgleichslösung" (german)
This may cause some false positives when partial matching, like:
- "ana" matches on "gañan", where in spanish "n" and "ñ" are different letters.
- (Other languages would have similar cases).
IMO these false positives are acceptable, a small side effect of making the search more lax so accented text is found easier. The user only needs to mark caseSensitive
to make the search strict to their terms.
In the merge request I've implemented this as an automatic behaviour when !caseSensitive
is passed and the search term is pure Ascii (first 128 chars, so just letters without any diacritic), but if you prefer API consumers to be explicit about wanting this, we could add it under a new diacriticSensitive
parameter (as was mentioned in https://bugzilla.freedesktop.org/show_bug.cgi?id=2929#c16 ).
Downstream bug in Evince: https://gitlab.gnome.org/GNOME/evince/issues/58