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

case insensitivity & Turkish character filtering problem with mongodb #29

Open
eppsoBatuhan opened this issue Jan 23, 2023 · 3 comments

Comments

@eppsoBatuhan
Copy link

it is not possible to filter unless you type the exact substring in db.
For example ;
The data in the field is "MAVİ GİYİM A.Ş."

to filter other datas,
it works fine by the time you type "mav"

however, when its "mavi", it does not return any data and forces user to type exactly the as the stored string.

@VitorCorrei4
Copy link
Contributor

VitorCorrei4 commented Jan 23, 2023

For the filter :
The "I" character you provided from "MAVİ GİYİM A.Ş." it's not a I (ascii 073)
MAVİ its diferente from MAVI

For case sensitive a workaround would be to use lowercase for data and filter

@eppsoBatuhan
Copy link
Author

unfortunately, turning it to lower case does not solve the problem in our case,
I need help for something like this
lower case i --> uppercase İ
lower case ı --> uppercase I

@VitorCorrei4
Copy link
Contributor

VitorCorrei4 commented Jan 23, 2023

It looks to me like a formatting problem, anyway it looks weird for both examples on the first
lower case i --> uppercase İ
the uppercase char (İ) is a different letter than the uppercase of "i" (ASCII : 105)
and on the other :
lower case ı --> uppercase I
also, those are diferent letters
Anyway, being case sensitive is a feature of the lib, as a last resource you can always use "string.ToUpper().ToLower()" to trying to force the string without special characters, or an extension method on string.

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

No branches or pull requests

2 participants