PHPcharactergarbled and charactergarbled. PHPcharactergarbled, charactergarbledMySql console query garbled DatabaseTable character set displayed in the Mysql console is different from the character set displayed in the right-click mysql console border PHP character garbled, charactergarbled
Garbled characters appear during query on the MySql console
The character sets of Database and Table are different from those displayed on the Mysql console.
Right-click the mysql console border and clickAttributeViewCurrent code pageWhether the character set mode of is the same as the character set mode of the database
View database character setsShow variables like '% char %';
The main points are: character-set-client = gbk character-set-server = gbk character-set-result = gbk.
Solution: set the character mode of the database.
Alert database Database_name default character set gbk;
Alert database Database_name default character set utf8 default collate utf8_geberal_ci;
Collate utf8_geberal_ci: the utf8 character proofreading mode gbk cannot be found. please leave a message.
No effect. open it.My. iniModify default-character-set = gbk character-set-server = gbk
Specify:
Create database Database_name character set gbk;
Page garbled: On Dreamware, find the page property to set the character mode.
If there is a link to Mysql, it should be consistent
Database + page character set + HTML head + Set names gbk)
The query database on the page obtains garbled characters:Mysql, page character set, whether mysql and PHP transfer characters are the same
Set the apache configuration file httpd. conf to add or modify the default apache character startup mode: AddDefaultchars gbk
Directly set the transmission character mysql> set names gbk
Mysql_query ("set names gbk", $ conn );
Mysql_close ();
?>
Http://www.bkjia.com/PHPjc/980030.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/980030.htmlTechArticlePHP character garbled, charactergarbled MySql console query garbled DatabaseTable character set displayed in the Mysql console character set is not the same right click mysql console border...