Questions that are too localized (such as syntax errors, code with restricted access, hacked sites, hosting or support issues) are not in scope. See how do I ask a good question?
Closed 6 years ago.
Improve this questionI am migrating a French wordpress website. After completion the website keeps displaying special characters, specially the black diamonds with white question mark inside �. I have installed the PO file inside wp-content/languages/ I have set up the language to French in the WP settings but still no luck.
Closed. This question is off-topic. It is not currently accepting answers.Questions that are too localized (such as syntax errors, code with restricted access, hacked sites, hosting or support issues) are not in scope. See how do I ask a good question?
Closed 6 years ago.
Improve this questionI am migrating a French wordpress website. After completion the website keeps displaying special characters, specially the black diamonds with white question mark inside �. I have installed the PO file inside wp-content/languages/ I have set up the language to French in the WP settings but still no luck.
You have a UTF-8 encoding issue.
You are seeing single, unprintable bytes. That suggests the data is either stored in a single byte character set, or something is converting it from UTF-8 to a single byte character set.
Regarding PO files (actually MO files are what WordPress reads). These need to be UTF-8 encoded.
You can check if the PO headers show "Content-Type: text/plain; charset=UTF-8"
but really this doesn't prove they are. Try opening them in a text editor that lets you switch between character sets. If the text only renders correctly in a single-byte character set (like ISO-8859-1) then you'll need to save the file out as UTF-8 and recompile the MO.
If you post a link to your PO I can tell you for sure whether they're wrongly encoded.
If you also have bad text in your post content, then either the stored data is wrongly encoded or the database connection is converting it.
If your WordPress config has standard settings like define('DB_CHARSET','utf8')
then the latter is less likely, but check the WordPress documentation on character sets and collation.
You say you "migrated" your site. If that involved SQL dumps then you may have broken your UTF-8 encoding at the database level.