case insensitivity & Turkish character filtering problem with mongodb
eppsoBatuhan opened this issue · 3 comments
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.
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
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
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.