-
Notifications
You must be signed in to change notification settings - Fork 8
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
Handle special chars #11
Comments
Will have a look into this. |
Current workaround: $name = Str::ascii($name);
where('name', $name); Just wondering if there is a default config for this issue. |
I will add a configuration option for this and sanitize parameters passed before the queries run. Will let you know when I get some time to actually do it. |
Please, dont. It is just workaround, i don't know if there is a best "native way" through drivers/PDO/ODBC config to do it. |
Hi, thanks for the pull requests. I'm swamped at work but I will get to this probably this weekend. |
Hi Robson Completely forgot about this, will revisit as soon as I'm back home later next week. |
The main problem here is at database level (Caché DB). How do you currently manage a "like"? Considering the target fields has special chars/accents. |
I am extending from I do not actually test the "like" part of queries and dont modify the values in this regard. My best guess is that we would need to override a function, either where the variables are added to the sql or where the like statement is created. I will investigate. There could also possibly be an ODBC or PDO ATTR setting that could handle this for us. Will check Cache and PHP sites. |
On Caché legacy DB my company has created an internal custom function "removeAccents()" So.. if name is where removeAccents(name) like "%joao%" ` But I am really looking for a more native solution. No lucky. |
Hi Yes, this can be easily fixed in one of the grammars. I will have a look as soon as I can. |
Is there any alternative through configuration to ignore special chars like:
á -> a
õ -> o
ç -> c
...
By default Caché does not ignore when making a simple "where" with sql. Otherwise i must implement a translator helper at app level.
The text was updated successfully, but these errors were encountered: