Reputation: 609
I am trying to show Thai Characters in my app PHP / MySQL, data is being inserted from a backend process to the database and Thai chars are in the Database, but are not show in the front end. PHP.
I have tried with UTF-8 encoding in the page, and Windows-874
What is the right combination for this to be shown correct in the Browser? see image
enter link to image bigger size
thanks
Upvotes: 0
Views: 4686
Reputation: 1774
To properly use UTF-8 within your web application, make sure that:
mysql_set_charset
, or, when you're not using ext/mysql, via the query SET NAMES utf8
header('Content-Type: text/html;charset=utf-8');
<meta name="Content-Type" content="text/html; charset=utf-8" />
Upvotes: 1
Reputation:
The site where you enter the text need to be utf-8 encoded and the table field.
Another thing which is often forgotten is to set
mysql_set_charset('utf8');
after opening the connection.
(And, of course, the frontend must be utf-8 encoded.)
Upvotes: 1