Skip to content
This repository has been archived by the owner on Jul 26, 2022. It is now read-only.

Autocomplete doesn't normalize accent marks, diacriticals, and special characters #46

Open
maximelebreton opened this issue Apr 8, 2019 · 7 comments

Comments

@maximelebreton
Copy link

maximelebreton commented Apr 8, 2019

Hello, and thanks for this awesome plugin!

In French language (and many other languages), we use accents, diacriticals etc...
So the user input need to be normalized to match words with or without special chars.
For example, États-unis should match with "états" and "etats", but it's currently not.

https://codepen.io/maximelebreton/pen/dLOOmO

Maybe the normalize() method is the solution: https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Objets_globaux/String/normalize

Thanks for your help!

@maximelebreton
Copy link
Author

and same for dash characters, who needs to be converted to space to match words like "États-unis" with "etats unis" input.

@marcboule98
Copy link

I have the same problem, and with normalize() on the input user, and on the results, it works perfectly.

@fbmfbm
Copy link

fbmfbm commented Sep 4, 2019

Hi @marcboule98 !
Can you provide some exemple ? normalize() don't resolve the ppm for me

thank's

@marcboule98
Copy link

Hi @marcboule98 !
Can you provide some exemple ? normalize() don't resolve the ppm for me

thank's

Hi! Right now I can't show you the example but it's just get the input user and use the normalize method, like that.

this.input = this.input.normalize()

This works for me!

@fbmfbm
Copy link

fbmfbm commented Sep 5, 2019 via email

@doijunior
Copy link

@fbmfbm not sure if you got a solution but I added a pull request to my solution here

while the pull is not accepted I am using from my fork repositorie

@mattzollinhofer
Copy link

This repo is no longer maintained. I've forked the repo here and have been maintaining it as best I can.

I just pushed a release that I think should solve the problem of matching diacritics (accents, etc). Check out v2.6.1 here!

cc: @doijunior, @fbmfbm, @marcboule98, @maximelebreton

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

No branches or pull requests

5 participants