0

I need to search from table, like

select * from geo where state='Grästorp'

But it does not give me any results. but when I run this query with phpmyadmin it gives me right result. How to search with in MySQL with non utf-8 chars?

naveen goyal
  • 4,571
  • 2
  • 16
  • 26
  • 1
    this may help http://stackoverflow.com/questions/14256742/to-use-utf8-or-not-mysql-and-php-character-encoding-issue – Emilio Gort Dec 12 '13 at 06:33

2 Answers2

0

select * from geo where state LIKE '%Grästorp%' collate utf8_bin;

saloni
  • 121
  • 4
0

you can try

SET NAMES 'utf8'

before querying anything else that has to do with unicode.

sotoz
  • 3,100
  • 3
  • 34
  • 41