在移动设备的情况下,Mysql查询关键字更改为php中的未知字符集

I am using a search query for selecting names in my DB by giving a keyword. My query is

SELECT `engine4_core_search`.* FROM `engine4_core_search` WHERE ((`engine4_core_search`.`title` LIKE "%".$text."%"))

When give " cardiff " (cardiff comes in place of $text ) as my keyword and checking the query ..it displays like

SELECT `engine4_core_search`.* FROM `engine4_core_search` WHERE ((`engine4_core_search`.`title` LIKE  'Êrdiff%'))

Is there any method to solve this. Thanks in advance.

It seems to be you have included jQuery-mobile (because tagged in it) In some cases jQuery-mobile replaces some strings when they attached with different patterns like " %cardiff " . It may considers to be different string set Just remove jQuery-mobile and try for your output......