实践过程如下:
1 在DOS中执行 mysql -h localhost -u root -p 进入mysql的DOS操作环境,
2 执行 show variables like 'character_set_%'; 显示出了我本机mysql的有关字符 编码的设置,结果如下:
+--------------------------+-----------------------------+
| Variable_name | Value |
+--------------------------+-----------------------------+
| character_set_client | latin1 |
| character_set_connection | latin1 |
| character_set_database | gbk |
| character_set_results | latin1 |
| character_set_server | gbk |
| character_set_system | utf8 |
| character_sets_dir | E:\mysql513\share\charsets\ |
+--------------------------+-----------------------------+
看到了,这就是乱码的原因了,现在我统一采用UTF-8编码,操作如下:
3
set character_set_client =utf8;
set character_set_connection =utf8;
set character_set_database=utf8;
set character_set_results=utf8;
set character_set_server=utf8
执行后后,你需要把c:/winNt/my.ini添加这"default-character-set=utf8"这行.
4 把原来的数据全清楚.重新执行脚本导出数据就一切搞定了.
5 把开源玩到底!
posted on 2006-04-08 14:57
有猫相伴的日子 阅读(1148)
评论(1) 编辑 收藏 所属分类:
pl/sql