Unicode error. database malfunctions

113 views Asked by At

I am using UTF-8 Character encoding for a social networking site project. but when making posts in other languages than English, database malfunctions.

what to do?

1

There are 1 answers

0
BlueM On

Usually all you have to do get a working UTF-8 setup with PHP/MySQL is to issue a SET NAMES 'utf8' query to MySQL before you do any other queries. And, of course, the Content-Type HTTP header and/or the HTML charset declaration must be set accordingly.

Moreover, if you have problems posting some Unicode codepoints (for instance, Emojis), you have to set the table charset to utf8mb4.

(Note: your question is very unspecific both in describing what you did and what the problem is, so this answer is only a guess.)