The difficulties of MySQL - Hiragana and Katakana are considered as the same

I tried to find ピ ー ス in the mysql SELECT * FROM edict WHERE japanese = 'ピ ー ス' database however I got 3 results: ヒ ー ス ビ ー ズ ピ ー ス

I tried using ぴ ー す as a query, and it also returns the same result. SELECT * FROM edict WHERE japanese = 'ぴ ー す'

How can I solve this problem?

thank

+3
source share
1 answer

I'm not sure about the Japanese alphabets, but you can use the BINARY comparison:

WHERE BINARY japanese = 'ピース'

BINARY the keyword casts the string to its binary representation, so you have an “exact” comparison.

, japanese, _bin one ( , )

+4

Source: https://habr.com/ru/post/1666542/


All Articles