WordPress posts display only ????? characters after being saved. (unicode characters only)

Tried referencing all the other posts on this matter but no luck.

The issue that, there are posts in English, Tamil and Sinhala (native language of Sri Lanka). The english articles are fine. But for sinhala and tamil the characters show ????? ?? ??? after being saved or updated. What we do is we copy and paste from google translate and transliterate directly to the wordpress editor.

Read More

I have checked the mysql table and it also shows the ??? ??? characters. But when inserted directly into the DB using phpmyadmin the characters display fine. Both in phpmyadmmin as well as in wordpress. But once edited or updated it goes back to being ??? ????.

WordPress char set is utf8 and collate is ”. Tried changing them to various settings and commenting out also but nothing worked so far.

Does anyone know the solution. We have the same setup on another test server and all the functions works on that server without any issue. Is there a specific PHP setting (btw, default charset in php ini is set to utf8) that is causing the problem?enter image description here

Related posts

1 comment

  1. The CHARSET is important; the COLLATE is not (for this question).

    This is probably what happened.

    • You are INSERTing non-western-Europe text
    • You said SET NAMES utf8 to declare that the client bytes are utf8-encoded (correct).
    • But the columns are declared CHARSET latin1.
    • Since there is no way to convert Chinese characters into latin1, ‘?’ stored.

    Please provide SHOW CREATE TABLE so we can verify that the column is not utf8.

Comments are closed.