我调试很久,现在用的数据库是mysql4.1字符集设置如下
mysql> show variables like 'character/_set/_%';
+--------------------------+--------+
| Variable_name | Value |
+--------------------------+--------+
| character_set_client | latin1 |
| character_set_connection | latin1 |
| character_set_database | utf8 |
| character_set_results | latin1 |
| character_set_server | utf8 |
| character_set_system | utf8 |
+--------------------------+--------+
6 rows in set (0.00 sec)
如果不是这样,重新启动webserver,你发送的中文全是"?????"
除了用
character_set_server = utf8
character_set_database = utf8
character_set_system = utf8
还要再mysql
my.ini文件中设置
default-character-set=utf8
重启后正常,不信你试试
mysql5我没有调试过,听说和4.X有区别
---------------------------------------------------------
>>character_set_client latin1
>>character_set_server utf8
Mysql客户端和系统端要统一设置,这是问题的关键。
楼主很有实干精神,赞一个!
本文转自
http://www.onetsoft.net/bbs/messages/t-1527.html;jsessionid=BAECC95F00DE5257CD4954FB274FBC97