Chinese / Japanese characters not supported by datatables search?
Chinese / Japanese characters not supported by datatables search?
awaitingmail
Posts: 4Questions: 0Answers: 0
Hi All,
We've been using datatables recently and came across a strange little problem.
For all our tables where English characters are displayed, everything works well..
But for the tables where Chinese characters are displayed in one of the cells, the search function does not work at all.. We store Chinese characters as UTF-8 in our database so when users type in a word in the search box we encode it as UTF-8 and then query the DB
For example, if user types in the Chinese String - 笔记本电脑
in DB - %E7%AC%94%E8%AE%B0%E6%9C%AC%E7%94%B5%E8%84%91
BUT, this is how Datatables search is converting the chinese string - %C3%A7%C2%AC%C2%94%C3%A8%C2%AE%C2%B0%C3%A6%C2%9C%C2%AC%C3%A7%C2%94%C2%B5%C3%A8%C2%84%C2%91
Any idea on why this may be happening.. Search doesn't work at all because of the above
Any help is much appreciated!
Manish
We've been using datatables recently and came across a strange little problem.
For all our tables where English characters are displayed, everything works well..
But for the tables where Chinese characters are displayed in one of the cells, the search function does not work at all.. We store Chinese characters as UTF-8 in our database so when users type in a word in the search box we encode it as UTF-8 and then query the DB
For example, if user types in the Chinese String - 笔记本电脑
in DB - %E7%AC%94%E8%AE%B0%E6%9C%AC%E7%94%B5%E8%84%91
BUT, this is how Datatables search is converting the chinese string - %C3%A7%C2%AC%C2%94%C3%A8%C2%AE%C2%B0%C3%A6%C2%9C%C2%AC%C3%A7%C2%94%C2%B5%C3%A8%C2%84%C2%91
Any idea on why this may be happening.. Search doesn't work at all because of the above
Any help is much appreciated!
Manish
This discussion has been closed.
Replies
Anyone?