寻找不区分大小写的MySQL排序规则,其中"a"表示!=“ä" [英] Looking for case insensitive MySQL collation where "a" != "ä"

查看:96
本文介绍了寻找不区分大小写的MySQL排序规则,其中"a"表示!=“ä"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找UTF8的MySQL排序规则,该排序规则不区分大小写,并且区分"a"和ä"(或更一般地,在变音/重音字符及其纯"格式之间进行区分).前者utf8_general_ci起作用,后者utf8_bin机器人都不起作用.如果没有这样的排序规则,该怎么做才能在WHERE子句中尽可能地接近?

I'm looking for a MySQL collation for UTF8 which is case insensitive and distinguishes between "a" and "ä" (or more generally, between umlauted / accented characters and their "pure" form). utf8_general_ci does the former, utf8_bin the latter, bot none does both. If there is no such collation, what can I do to get as close as possible in a WHERE clause?

推荐答案

我的建议是使用utf8_bin,并在WHERE子句中将比较的两端都强制为大写或小写.

My recommendation would be to use utf8_bin and in your WHERE clause, force both sides of your comparison to upper or lower case.

这篇关于寻找不区分大小写的MySQL排序规则,其中"a"表示!=“ä"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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