Error in Arabic script in MySQL(MySQL 中的阿拉伯语脚本错误)
问题描述
我在包含阿拉伯文字的 MySQL 数据库中插入了数据.虽然输出正确显示阿拉伯语,但 MySQL 中的数据看起来很垃圾.像这样:
I inserted data in a MySQL database which includes Arabic script. While the output displays Arabic correctly, the data in MySQL looks like garbage. Something like this:
'صَومُ ثَلاثَةِ أيّامٍ مِن كُلِّ شَهرٍ ـ أربَعاءُ بَينَ خَ
我应该担心这个吗?如果是,我如何让它在 MySQL 中以正确的阿拉伯语脚本显示?
Should I be worried about this? If yes, how do I make it appear in proper Arabic script in MySQL?
推荐答案
那些是 HTML 实体.
Those are HTML entities.
如果这个文字
صَومُ ثَلاثَةِ أيّامٍ مِن كُلِّ شَهرٍ ـ أربَعاءُ بَينَ خَ
صَومُ ثَلاثَةِ أيّامٍ مِن كُلِّ شَهرٍ ـ أربَعاءُ بَينَ خَ
应该是您的数据库中的内容,一切很可能没问题:您的阿拉伯语输入会在此过程中的某个时刻转换为这些实体.
is what is supposed to be in your database, everything's most likely fine: Your arabic input gets converted into those entities at some point along the way.
要像上面一样查看实际的阿拉伯字符,请将它们插入一个文本文件中,将其命名为 something.htm
并在浏览器中打开它.
To view the actual arabic characters like above, insert them into a text file, name it something.htm
and open it in your browser.
您也可以将其转换为 UTF-8 编码的 mySQL 表中的正确"本机字符,但要获得任何指示,您必须告诉我们您正在使用的语言/平台.
You could also convert it into "proper" native characters in a UTF-8 encoded mySQL table, but for you to get any pointers how to do that you would have to tell us what languages/platforms you are working with.
这篇关于MySQL 中的阿拉伯语脚本错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:MySQL 中的阿拉伯语脚本错误


基础教程推荐
- 带更新的 sqlite CTE 2022-01-01
- CHECKSUM 和 CHECKSUM_AGG:算法是什么? 2021-01-01
- ORA-01830:日期格式图片在转换整个输入字符串之前结束/选择日期查询的总和 2021-01-01
- MySQL 5.7参照时间戳生成日期列 2022-01-01
- 带有WHERE子句的LAG()函数 2022-01-01
- 从字符串 TSQL 中获取数字 2021-01-01
- 如何在 CakePHP 3 中实现 INSERT ON DUPLICATE KEY UPDATE aka upsert? 2021-01-01
- 使用 VBS 和注册表来确定安装了哪个版本和 32 位 2021-01-01
- while 在触发器内循环以遍历 sql 中表的所有列 2022-01-01
- MySQL根据从其他列分组的值,对两列之间的值进行求和 2022-01-01