简体   繁体   English

带有撇号问题的 Wordpress 字符编码

[英]Wordpress character encoding with apostrophes issues

I am getting strange character encoding on my Wordpress website when I use apostrophes.当我使用撇号时,我的 Wordpress 网站上出现奇怪的字符编码。 Every single page and post where I use apostrophes outputs things like the following:我使用撇号的每个页面和帖子都会输出如下内容:

  • isnât不是
  • ÃÂ Ø
  • Readyâ准备好了
  • â一种

I have contacted my hosting who were less than useful but told me that “the database seems to be correctly set to utf8mb4 encoding”我联系了我的主机,他们不太有用,但告诉我“数据库似乎已正确设置为 utf8mb4 编码”

I have checked wp-config and it also says utf8, view source on the page says utf8 also.我已经检查过 wp-config,它也说 utf8,页面上的查看源也说 utf8。

I've tried commenting out:我试过注释掉:

//define('DB_CHARSET', 'utf8');
//define('DB_COLLATE', '');

Adding “-“ in to match view source output添加“-”以匹配视图源输出

//define('DB_CHARSET', 'utf-8"');

I've changed typography settings to use Ariel with no joy.我已经更改了排版设置以使用 Ariel 而不高兴。 In the page editor, there are no indications of the weird characters, everything looks fine.在页面编辑器中,没有任何奇怪字符的迹象,一切看起来都很好。 It's just the output on the page?它只是页面上的输出?

Not sure where else to turn now :-(不知道现在还能去哪里:-(

i think that's because of your function file, can you try with default theme我认为那是因为您的函数文件,您可以尝试使用默认主题吗

and this way you can fix previous errors这样你就可以修复以前的错误

UPDATE wp_posts SET post_content = REPLACE(post_content, '“', '“');

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM