Issue with utf-8 encoding using PHP + MySQL

后端 未结 10 1530
谎友^
谎友^ 2020-12-16 12:41

I moved data from MySQL 4 (they were originally set to latin2 encoding) to MySQL 5 and set encoding to utf-8. It

10条回答
  •  抹茶落季
    2020-12-16 13:16

    mysql_query("SET NAMES UTF8");
    

    adding this line at the end of my "connection.php" solved my problem.

    My connection file's complete code is:

    
    

    My database collation is "utf8_general_ci".

    Pages are "dreamweaver default utf8" and "unicode normalisation form=C (Canonical Decomposition)".

提交回复
热议问题