在mysql中搜索带有变音符号的阿拉伯语单词 [英] searching arabic words that have diacritics in mysql

查看:32
本文介绍了在mysql中搜索带有变音符号的阿拉伯语单词的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为了让我的问题变得简单,任何人都知道为什么这个查询返回 true

to make my question simple anyone knows why this query returns true

SELECT 'الجنة' ='الْجِنَّةِ' COLLATE utf8_unicode_ci ;

虽然此查询返回 false

while this query returns false

SELECT 'الجنة' LIKE '%الْجِنَّةِ%' COLLATE utf8_unicode_ci ;

我怎么能让后者返回 true ?谢谢.

and how could I let the later returns true ? thanks .

推荐答案

这里我修改了 AllInOne 的 sqlfiddle 使其工作:http://sqlfiddle.com/#!2/4a7004/3
NATURAL LANGUAGE MODE 更改为 BOOLEAN MODE
并将 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci 添加到数据库结构中.

here the sqlfiddle of AllInOne that I modified to make it work : http://sqlfiddle.com/#!2/4a7004/3
changed NATURAL LANGUAGE MODE to BOOLEAN MODE
and added DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci to the db structure .

这篇关于在mysql中搜索带有变音符号的阿拉伯语单词的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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