JASON error in Server-side processing when Korean typed in sSearch
JASON error in Server-side processing when Korean typed in sSearch
Swann
Posts: 5Questions: 0Answers: 0
I got the following error alert message:
"JASON data could not be parsed.... "
only when I type a Korean keyword in filter input box.
English has NO PROBLEM. why only Korean? :( I guess it is caused by character since Jason accepts only utf-8.
I checked everything .. file encoding, mysql server character set..etc.
Any advice would be really appreciated. I spent all night for this. giving me headache.
Chae from Seoul Korea
"JASON data could not be parsed.... "
only when I type a Korean keyword in filter input box.
English has NO PROBLEM. why only Korean? :( I guess it is caused by character since Jason accepts only utf-8.
I checked everything .. file encoding, mysql server character set..etc.
Any advice would be really appreciated. I spent all night for this. giving me headache.
Chae from Seoul Korea
This discussion has been closed.
Replies
Allan
If I use it client-side process. Filter works well with Korean and even Chinese.
One funny thing is ... initializing the datatables works fine with Korean Language.
thanks,
Allan
This is the result of DataTables debugger. I can't see any problem with this. :(
[quote]
Illegal mix of collations
for operation 'like'
[/quote]
That's not valid JSON as the error says :-). Not sure what would be triggering that error in your script, but that's what the problem is.
Allan
It works fine with Korean characters that makes me more crazy and confused. :(
So I tried to have exactly the same configurations as the testing system for mysql character set, default charset of php.ini, and even system locale... But it doesn't work on my actual system.
Did I miss something??
The debugging report of the system on which datatables filter works with Korean characters.
http://debug.datatables.net/eriwul
Please give me any advice. If I solve this weird problem... I can't help loving Datatables.
Chae from Seoul Korea.
I'm afraid I don't know what would cause the error condition that you are seeing above. Very likely a character set conversion issue. I'd start by making sure that everything (javascript, HTML page, database, php / db link etc etc) is all in UTF8.
Allan
I've solved my problem. It's caused by mysql bug or not bug.. Not sure yet. Anyways,
My code to fetch data from mysql includes registration date in datetime type. datatables filter uses like query like "%Korean character%". This caused the problem. This works fine on my testing system with mysql 5.14 but it doesn't with 5.5x version of mysql and returns an error saying illegal mix of collation bla bla....
Now I left out the datetime column from datatables search.. and it works fine.
But I can't say for sure if it's about mysql version or something. I have to keep an eye on it. and if I found something else, I will leave the message here. I have wasted long time for this. alot of catching up to do.
Hope I will be back with correct answers...
Allan, thanks again for your support.
And I love datatables.. :)
Chae.
Thanks for the update. Sounds like a horrible little bug that if they've broken something in the latest releases! Good luck resolving it full.
Regards,
Allan