Recently I worked in a project in where I need to display japanese text which are come from database. I already use
meta http-equiv="Content-Type" content="text/html; charset=utf-8"
It help to display the static text. But when it come from database it display “??????????” type text.
How can I solve this kind of problem?
Is the database charset
UTF8too? Is the connection charsetUTF8? Seems like the data gets converted toISO-8859-1somewhere along the way.Without more information, it is hard to find exactly what the problem is. What DBMS are you using? MySQL? PostgreSQL? Either way, I’m pretty sure either your database and/or your connection isn’t using
UTF8.You can change your connection charset by using one of the following functions: