Validation checkboxes
Feature description
Currently when searching for words you have to include accents to for the word to be included in the results if the word has accented letters.
For example searching for frere will not show frère as a search result, although imo it should (for people like me who don't really know to type them properly ☹️ )
Proposed solution
From what I can find, unicodedata.normalize('NFC', text) would normalize the text to be used for comparisons.
Not sure if this is best way. unicodedata has to be imported for this to work.
I was wrong. We would need something like this:
def normalize_text(text: str) -> str:
text = unicodedata.normalize("NFD", text) # we need to use decompose not compose option to separate chars
return ''.join(character for character in text if not unicodedata.combining(character))
I have a commit here. If it's good enough I can add it to pr #28 or a new one.
Additional information
I can give a shot implementing this if @Dzheremi2 thinks this is a good idea.
Already gave a shot anyway 😉.
Validation checkboxes
Feature description
Currently when searching for words you have to include accents to for the word to be included in the results if the word has accented letters.
For example searching for frere will not show frère as a search result, although imo it should (for people like me who don't really know to type them properly☹️ )
Proposed solution
From what I can find,unicodedata.normalize('NFC', text)would normalize the text to be used for comparisons.Not sure if this is best way.
unicodedatahas to be imported for this to work.I was wrong. We would need something like this:
I have a commit here. If it's good enough I can add it to pr #28 or a new one.
Additional information
I can give a shot implementing this if @Dzheremi2 thinks this is a good idea.Already gave a shot anyway 😉.