Search filter issue with Turkish characters "ı" , "İ" , "Ş" , "ş" , "Ğ" , "ğ"
Search filter issue with Turkish characters "ı" , "İ" , "Ş" , "ş" , "Ğ" , "ğ"
animacoder
Posts: 4Questions: 1Answers: 0
Hi everyone,
also Allan, are you there?
I'm getting an ajax warning when I type Turkish characters into search input. I'm looking around to finding solution for a long time. I have got a big project which includes more than 700 users. Please, save my time and customers.
This discussion has been closed.
Answers
What is the response from the server? The tech note that the error message links to shows you how to get that information and other debugging information.
Allan
SQLSTATE[HY000]: General error: 1271 Illegal mix of collations for operation 'like'
500 Internal Server Error - DBALException
I shared a screenshot.
Sounds like your database table is a specific collation, but the data submitted is something else - probably UTF8. What is the collation of your database table?
You could add something like:
to force a common character set.
Allan
Thank you Allan. Your suggestion helped me but I think that It seems like a MySQL bug. If you search a string in datetime field of Mysql, It returns 500 error. When I set date columns' searchable options to false, ajax error messages did not appear.
I solved ajax warning but I have problem with searching Turkish lower case characters. I'm trying to solve now...
I had thought MySQL would accept that. However, is client-side processing an option for you? How many rows are in your table?
Allan
single table for datatable: ~196,687
total records of all database: 2,333,990...
Datatable is perfect tool for me. For this reason, I do not wanna use server-side pagination or another method.
I accepted MySQL bug for now. "SET NAMES utf8" method does not work for Turkish characters "ı", "ü", "ğ". I still have not found a solution