Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for non-ASCII search #133

Closed
maxcorbeau opened this issue Feb 3, 2017 · 7 comments
Closed

Add support for non-ASCII search #133

maxcorbeau opened this issue Feb 3, 2017 · 7 comments

Comments

@maxcorbeau
Copy link

Hi all,

Currently, Fuse doesn't support searching through non-ASCII characters. For instance searching with stro on strömberg only matches str. This could be changed by

  • transliterating input to ASCII (e.g. stro -> stro)
  • transliterating all strings within an item to ASCII when evaluating that item (e.g. strömberg -> stromberg)
  • performing the match on the transliterated item (e.g. match [0,3])
  • returning original version item + matches (e.g. strömberg + match [0,3])

This code seems to have a pretty complete transliteration table (see char_map object):
https://github.com/pid/speakingurl/blob/master/lib/speakingurl.js

Not that I have a need for it at the moment, just bringing it up as a suggestion :)

@drzraf
Copy link

drzraf commented Jul 28, 2017

"string".normalize('NFD').replace(/[\u0300-\u036f]/g, ""); would do it as part of a lexer

@popod
Copy link

popod commented Aug 5, 2017

Any news about this feature ? Will it be implemented soon ? Thanks

@pinturic
Copy link

Lots of people need it...

@fnune
Copy link

fnune commented May 8, 2019

Would appreciate the inclusion of this feature. BTW awesome library!

@github-actions
Copy link

github-actions bot commented Apr 1, 2020

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days

@github-actions github-actions bot added the Stale label Apr 1, 2020
@github-actions github-actions bot closed this as completed Apr 7, 2020
@codebury
Copy link

Hi! Any news about this feature?

@bleuscyther
Copy link

I think this should solve the issue:
#415

It uses the diacritics library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants