MySQL查询选择像变音符号土耳其字母 [英] mysql query select like with diacritic Turkish letters

查看:152
本文介绍了MySQL查询选择像变音符号土耳其字母的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在土耳其语中有一个令牌表; 它的默认排序规则是 utf8_general_ci 在FreeBSD服务器上,mysql版本是5.6.15

I have a token table in Turkish; it's default collation is utf8_general_ci On FreeBSD server, mysql version is 5.6.15

我要查询;

select * from tokens where type like 'âmâ';

select * from tokens where type='âmâ';

有了这些查询, 结果必须是âm"的唯一字符(在土耳其语中也表示"blind") 但是我有四个原始结果;

With these queries, result must be one unique for 'âmâ' (it means 'blind' in Turkish also) But i have four raw result;

result 1 "amâ" means 'but'
result 2 "ama" means 'but'
result 3 "âma" means 'blind'
result 4 "âmâ" means 'blind'

那不是我想要的.

我尝试了不同的排序规则,字符集和名称. 但与工作结果相同.

I tried different collations and character sets and names. But same results with working ones.

请帮助

推荐答案

您可以强制进行二进制比较:

You could force a binary comparison:

SELECT * FROM tokens WHERE BINARY type='âmâ';

请参阅二进制运算符的文档a>.

这篇关于MySQL查询选择像变音符号土耳其字母的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆