krisk / Fuse

Lightweight fuzzy-search, in JavaScript
https://fusejs.io/
Apache License 2.0
18.36k stars 772 forks source link

How does Fuse handle accented characters? #322

Closed cbdeveloper closed 5 years ago

cbdeveloper commented 5 years ago

I've looked around and made some tests, but haven't figured out yet.

How does Fuse handle accented characters? Both in the search string, and in the searched values. Does it modify them somehow? Or it will end up matching all other characters except for the accented ones? See examples below:

Example 1:

Search string: résumé Item.title: "This is my resume"

Example 2:

Search string: resume Item.title: "This is my résumé"

What's is the behavior in these two situations?

Thanks.

krisk commented 5 years ago

Accented characters will match accordingly. In your particular case, "é" will match "é", and "e" will match "e".

rkurbatov commented 5 years ago

We use lodash deburr for such searches

cbdeveloper commented 5 years ago

Thanks!