Skip to content
This repository was archived by the owner on Nov 3, 2025. It is now read-only.
This repository was archived by the owner on Nov 3, 2025. It is now read-only.

[Feature Request]: Use accent insensitive search #29

Description

@JoseBritto

Validation checkboxes

  • I have searched for my feature request around issue tracker and didn't find anything (closed issues count as well)
  • I'm using English language for this issue. Non-English issue will be marked as invalid
  • I declare that this issue is not a question. If you want to ask something, go to the Discussions
  • Please stay tuned for messages from the contributors to your feature request. Don't keep them waiting too long

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 😉.

Metadata

Metadata

Assignees

Labels

feature-requestNew feature or requestfix-availableIf an issue is not closed and has this label, it means the issue is already fixed, but not released

Projects

Status
Released

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions