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 中的阿拉伯语脚本错误


- 如何使用 pip 安装 Python MySQLdb 模块? 2021-01-01
- 更改自动增量起始编号? 2021-01-01
- SQL 临时表问题 2022-01-01
- 如何将 Byte[] 插入 SQL Server VARBINARY 列 2021-01-01
- 使用 Oracle PL/SQL developer 生成测试数据 2021-01-01
- 在SQL中,如何为每个组选择前2行 2021-01-01
- 以一个值为轴心,但将一行上的数据按另一行分组? 2022-01-01
- 远程 mySQL 连接抛出“无法使用旧的不安全身份验证连接到 MySQL 4.1+"来自 XAMPP 的错误 2022-01-01
- 如何将 SonarQube 6.7 从 MySQL 迁移到 postgresql 2022-01-01
- 导入具有可变标题的 Excel 文件 2021-01-01