mysql 乱码产生探讨
实验一
1。首先,在下面情况下:
mysql> show variables like 'character_set_%';
+--------------------------+---------------------------------------+
| Variable_name | Value |
+--------------------------+---------------------------------------+
| character_set_client | latin1 |
| character_set_connection | latin1 |
| character_set_database | latin1 |
| character_set_filesystem | binary |
| character_set_results | latin1 |
| character_set_server | latin1 |
| character_set_system | utf8 |
| character_sets_dir | D:\Programs\mysql5045\share\charsets\ |
+--------------------------+---------------------------------------+
建表,并加入3个记录:大,阿,爱
2。set character_set_results=utf8;
则显示:(cmd窗口中,cmd窗口代码页936)
大->麓贸
阿->掳垄
爱->掳庐
分析编码:
大U:5927,GBK:B4F3
麓U:9E93,GBK:C2B4
贸U:8D38,GBK:C3B3
阿U:963F,GBK:B0A2
掳U:63B3,GBK:C2B0
垄U:5784,GBK:C2A2
爱U:7231,GBK:B0AE
掳U:63B3,GBK:C2B0
庐U:5E90,GBK:C2AE
相关新闻>>
- 发表评论
-
- 最新评论 更多>>