My problem is that PHP cannot parse Chinese characters.
I was using the header ("Content-type:text/html;charset=utf-8");
There are about 4 places where garbled characters are found:
1, the file encoding method (that is, you create a new file encoding), this need to set the editor encoding.
2, the page does not specify the browser encoding display mode, this solution is:
1). If the page is. html needs to be set <meta http-equiv= "Content-type" content= "text/html; Charset=utf8 "/>
2). If the x.php file needs to be added to the header ("Content-type:text/html;charset=utf-8"). The general meaning is to tell the browser that I want to utf-8 the code to display the page.
3, in the new database to specify the database encoding, and in the link database need to add mysql_query ("Set names UTF8"); Specifies that the information encoding of the database output is utf-8.
4, in the Ajax, you need to specify the acceptance of the page to accept the data encoding. Use the function Iconv ().
In short: All the codes are unified. Whether the code is UTF-8 or GBK, etc.
Original address: http://www.jb51.net/article/38944.htm
Summary of garbled problems in Zend Studio