1

When I excute this query:

SELECT * FROM `PageMapLine` WHERE name = "không" 

The result include unexpected records like "Khổng" and "Khong":

id      name    pageID  stem    lemma
--------------------------------------
236040  Khổng   236040  NULL    NULL
494405  Không   494405  NULL    NULL
796340  Khong   796340  NULL    NULL
--------------------------------------

My table encoding was utf8_general_ci.

dario
  • 5,149
  • 12
  • 28
  • 32
Kim
  • 33
  • 5

1 Answers1

1

It is because of your ci (case insensitive) codification. I would use utf8_bin instead. Remember to backup first.

Case insensitive is also insensitive to those special characters.

Carlos
  • 1,638
  • 5
  • 21
  • 39
  • But I want my query case insensitive then how can I do? – Kim Jan 17 '15 at 12:19
  • 1
    @Kim Have you tried with utf8_unicode_ci? Take a look here, please: http://stackoverflow.com/questions/2344118/utf-8-general-bin-unicode – Carlos Jan 17 '15 at 13:14
  • @Kim Did you solved your problem? If so, please mark the question as answered. Thank you – Carlos Jan 21 '15 at 17:09