0

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.

Vishnu Prasad
  • 729
  • 1
  • 11
  • 28
  • So find out why there is unknown symbol in front of your string. What you pass - that you see. – Justinas Oct 10 '14 at 07:05
  • @Justinas what ever keyword i pass , it will be replaced to unknown character set.Thats what i dint get any idea. – Vishnu Prasad Oct 10 '14 at 07:10
  • Have you tried converting encoding to `UTF-8` or whatever encoding your DB uses. – Justinas Oct 10 '14 at 07:19
  • look at this maybe? http://stackoverflow.com/questions/7979567/php-convert-any-string-to-utf-8-without-knowing-the-original-character-set-or – boomoto Oct 10 '14 at 12:10

1 Answers1

0

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......

sijo vijayan
  • 1,590
  • 1
  • 21
  • 34