-
Notifications
You must be signed in to change notification settings - Fork 61
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
Issue with Greek characters & searchNormalize #279
Comments
Hello @nikolasr200 static normalizeString(text) {
Another alternative would be: `static normalizeString(text) {
}; // Create a regex pattern to match accented characters // Normalize the text to lowercase, remove accents, and non-word characters return normalizedText; Could you run some tests on top of this in order to make sure it won't break the current use cases and fulfil the requirements you mentioned? I'm also worried about performance in these scenarios. cc: @sa-si-dev |
IMHO, it would be probably a good idea to allow to pass a |
I personally will see that as a new feature (even to be able to be backwards compatible) and here just try to include new use cases without further impacts. |
Hi @nikolasr200 |
Hi @gnbm, sorry i didn't have the time to do any tests so far. I believe your approach is to the right direction, and i ll try to test it asap. |
I think it's more complex to handle all diacritics, and it would be better to not reinvent the wheel : for example, this package is well maintained and tested https://github.com/motss/normalize-diacritics |
Feel free to add that to the library via PR so that we can avoid breaking changes and @sa-si-dev might be able to review it |
Hi,
i seem to face an issue with Greek characters and searchNormalize. In Greek we have accents as well, so, if i set searchNormalize to true no result at all is returned from the list. If i set searchNormalize to false, search results are returned, as long as accented vowels are entered with corresponding accent.
example
Ένα
Δύο
Τρία
Τέσσερα
if i set searchNormalize to true and search with "α" i get no results
if i set searchNormalize to false and search with term "α" i get (correctly)
Ένα
Τρία
Τέσσερα
but with searchNormalize to false, if i search with term Ε (no accent) i ll get only
Τέσσερα
and not Ένα (as well)
So searchNormalize set to true seems (in my case) to break completely the search
The text was updated successfully, but these errors were encountered: