searching arabic words that have diacritics in mysql(在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中搜索带有变音符号的阿拉伯语单词的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:在mysql中搜索带有变音符号的阿拉伯语单词


基础教程推荐
- 无法在 ubuntu 中启动 mysql 服务器 2021-01-01
- 在 VB.NET 中更新 SQL Server DateTime 列 2021-01-01
- 使用pyodbc“不安全"的Python多处理和数据库访问? 2022-01-01
- Sql Server 字符串到日期的转换 2021-01-01
- 将数据从 MS SQL 迁移到 PostgreSQL? 2022-01-01
- SQL Server 2016更改对象所有者 2022-01-01
- ERROR 2006 (HY000): MySQL 服务器已经消失 2021-01-01
- SQL Server:只有 GROUP BY 中的最后一个条目 2021-01-01
- 如何在 SQL Server 的嵌套过程中处理事务? 2021-01-01
- SQL Server 中单行 MERGE/upsert 的语法 2021-01-01