admin管理员组文章数量:1315054
I would like a Greek word (Ἀπὸ) to render on a page like it rendered right here. If I copy Ἀπὸ directly to a page via the Wordpress interface, it shows just fine in both the interface and on the actual page. However when I use some PHP to read it out of a MySQL table and add it to a page, it renders ??? instead of Ἀπὸ.
Before you think it is messed up in the database, it renders as expected in Sequel Pro. However I did notice something interesting in its interface. You can select "View Using Encoding..." If I select "UTF-8 Unicode BMP (utf8)" or "UTF-8 Full Unicode (utf8mb4)", it works. If I select "UTF-8 Unicode via Latin 1", I get ???.
The database encoding is: UTF-8 Unicode (utf8)
The database collation is: utf8_unicode_ci
The table reports the same encoding and collation.
If I view the source of the page that gives me "???" I see:
<meta charset='utf-8'>
What am I missing?
I would like a Greek word (Ἀπὸ) to render on a page like it rendered right here. If I copy Ἀπὸ directly to a page via the Wordpress interface, it shows just fine in both the interface and on the actual page. However when I use some PHP to read it out of a MySQL table and add it to a page, it renders ??? instead of Ἀπὸ.
Before you think it is messed up in the database, it renders as expected in Sequel Pro. However I did notice something interesting in its interface. You can select "View Using Encoding..." If I select "UTF-8 Unicode BMP (utf8)" or "UTF-8 Full Unicode (utf8mb4)", it works. If I select "UTF-8 Unicode via Latin 1", I get ???.
The database encoding is: UTF-8 Unicode (utf8)
The database collation is: utf8_unicode_ci
The table reports the same encoding and collation.
If I view the source of the page that gives me "???" I see:
<meta charset='utf-8'>
What am I missing?
Share Improve this question asked Dec 18, 2016 at 0:34 Kenneth VogtKenneth Vogt 1318 bronze badges1 Answer
Reset to default 1wp-config.php
includes scope for settings for "DB_CHARSET" and DB_COLLATE. Are those settings operative? How do they correspond to the your actual database settings.
If the config settings are operative, it might you might try it with them commented out.
Edit: On reflection/research, I would set the db_charset and db_collate settings.
There are other possibilities (such as making sure that the file is set to UTF-8 and not UTF-BOM). No doubt you have researched widely, but this question from 2012 resonated in terms of the db content appearing sound, but printing as "????". I refer you to "PHP MySQL Greek letters showing like ???? marks" where
本文标签: Greek characters only showing in certain circumstances
版权声明:本文标题:Greek characters only showing in certain circumstances 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741963732a2407426.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论