Page is a not externally linkable
- WebmasterWorld
-- Webmaster General
---- struggling with chinese characters, in MySQL/PHP


httpwebwitch - 1:20 pm on Jul 15, 2010 (gmt 0)


@UserFriendly,
using mysql_set_charset() caused my Chinese characters to be displayed as "偉大的產品 好價錢"

Without mysql_set_charset(), everything works fine. I can accept a <form>, read the $_POST, do a SQL INSERT, SELECT, print()... all the pieces fit and the Chinese characters look good on the page without any fiddling with encodings or conversions.

In what situation would mysql_set_charset() be needed? Is that for when your DB is Latin1, but the page is UTF8? Or the other way around? Alls I know is if both are UTF8, mysql_set_charset() causes problems.


Thread source:: http://www.webmasterworld.com/webmaster/4168927.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com