So now i faced very strange problem, when i insert Chinese name in the database, the database table is alway show ??? in the database.
- mysql> select * from user1;
+----+------+----------------------------------+--------------------+-----+
| id | name | password | email | age |
+----+------+----------------------------------+--------------------+-----+
| 2 | xm | 202cb962ac59075b964b07152d234b70 | xiaoming@sohu.com | 34 |
| 3 | xz | 202cb962ac59075b964b07152d234b70 | xiaozheng@sohu.com | 28 |
| 4 | ?? | 202cb962ac59075b964b07152d234b70 | xiaoming@sohu.com | 34 |
| 5 | ??? | 202cb962ac59075b964b07152d234b70 | xiaoming@sohu.com | 34 |
| 6 | ?? | 202cb962ac59075b964b07152d234b70 | wangying@sohu.com | 13 |
+----+------+----------------------------------+--------------------+-----+
5 rows in set (0.03 sec)
after that i type "show variables like '%char%';"
- mysql> show variables like '%char%';
+--------------------------+------------------------------------------------+
| Variable_name | Value |
+--------------------------+------------------------------------------------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | latin1 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | latin1 |
| character_set_system | utf8 |
| character_sets_dir | /Applications/XAMPP/xamppfiles/share/charsets/ |
+--------------------------+------------------------------------------------+
8 rows in set (0.29 sec)
restart the XMAPP ,the variables table become this again:
- mysql> show variables like '%char%';
+--------------------------+------------------------------------------------+
| Variable_name | Value |
+--------------------------+------------------------------------------------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | latin1 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | latin1 |
| character_set_system | utf8 |
| character_sets_dir | /Applications/XAMPP/xamppfiles/share/charsets/ |
+--------------------------+------------------------------------------------+
8 rows in set (0.29 sec)
So,please help me fix the issure,Thanks a lot.