如何在 WordPress 博客文章中同时显示阿拉伯语和英语文本?
我正在尝试创建一个以阿拉伯语和英语作为主要语言的博客。我使用 unicode (UTF-8) 作为字符编码,但是当我将一大段阿拉伯文本粘贴到编辑器中时,它全部显示为“?”。当我第一次粘贴它时,它在编辑器中显示良好,但单击更新后,它将所有阿拉伯文本更改为垃圾。我该怎么做才能保持阿拉伯语文本正确显示?
I am trying to make a blog that has both arabic and english as primary languages. I'm using unicode (UTF-8) as my character encoding but when I paste a chunk of arabic text into the editor, it comes out as all "?". It shows up fine in the editor when I first paste it, but then after clicking update, it changes all the arabic text to junk. What can I do to keep the arabic text displaying correctly?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看起来像是数据库字符集问题。您可以尝试以下一些操作:
最简单
检查设置> >读取您已将编码设置为 UTF-8。
简单
打开您的 wp-config.php 并找到这一行:
将其更改为:
PITA
将数据库字符集转换为 UTF-8,如 本文。
Looks like a database charset problem. Here are a few things you can try:
Easiest
Check in Settings > Reading that you've got encoding set to UTF-8.
Easy
Open up your wp-config.php and find this line:
Change it to:
PITA
Convert your database charset to UTF-8, as explained in this article.