WordPress/MySQL - 撇号作为问号输出
我正在将客户的 WordPress 网站从旧主机迁移到闪亮的新主机。我已经完成了 WP 数据库的 MySQL 转储,并将其导入到新主机中。
一切都很顺利,除了撇号被编码为问号。
我做了一些研究,最接近的是将 .sql 转储保存为 UTF8(我已经完成了),然后尝试再次导入 - 没有运气。我还将 MySQL 转储中 DEFAULT CHARSET=latin1;
的每个引用更改为 DEFAULT CHARSET=utf8;
,但是,这也没有什么区别。
在一些奇怪的情况下(我不记得确切的配置),撇号完全丢失,没有被任何东西替换,但它们只是消失了。
它们不是标准的直撇号('
),而是我相信的右弯引号(’
) - 例如,它们是 ', not '。希望一切顺利!
有什么建议吗?
谢谢!
杰克
I'm moving a client's WordPress site from an old host to a shiny new one. I've done a MySQL Dump of the WP database, and imported it into the new host.
Everything has worked smoothly, except, apostrophes are being encoded as question marks.
I've done a little research and the closest I've got is saving the .sql dump in UTF8 (which I've done), then trying to import again - no luck. I've also changed every reference of DEFAULT CHARSET=latin1;
in the MySQL dump to DEFAULT CHARSET=utf8;
, however, this also makes no difference.
In some odd cases (I can't remember the exact configuration), apostrophes are lost entirely, not replaced with anything, but they just disappear.
They aren't standard straight apostrophes ('
) but rather right curly quotes I believe (
) - e.g. they're ’, not '. Hope that comes out ok on SO!
Any advice?
Thanks!
Jack
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
它们在哪里显示为
?
?当你在浏览器中查看它时?您是否在标头中将 UTF8 作为字符集发送?
Where do they appear as
?
? When you view it in your browser?Do you send UTF8 as charset in the headers?