2010/5/31 Lemon <lemon027(a)gmail.com>
原来的一个实验室的小管理系统,数据是用gb2312录入的,现在想导出数据用于另外一个数据库。可是不论从终端登录还是phpmyadmin登录都是乱码,有没有解决方案?
如果用语言的api的话好像是连接数据库以后加一句:“mysql_query("set names gb2312")”
如果是导入导出你看看表的编码集对不对:
比如:
CREATE DATABASE `bankmanage` DEFAULT CHARACTER SET utf8 COLLATE
utf8_general_ci;
USE `bankmanage`;
CREATE TABLE IF NOT EXISTS `account` (
`aid` bigint(11) NOT NULL AUTO_INCREMENT,
`uid` varchar(20) NOT NULL,
`password` varchar(256) NOT NULL,
`money` bigint(11) NOT NULL DEFAULT '0',
`create_date` date NOT NULL,
`lost` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`aid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=6222003202100000009 ;
--
There are only 10 types of people in the world, those who understand binary
and those who don't.
--
(This is Carbon Copied from legacy mailing list fedora-cn(a)googlegroups.com
.)
_______________________________________________
Chinese mailing list
Chinese at
lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/chinese
--
Cheng(�)
Fedora User
My Page:
http://scienologies.blogspot.com
http://gnudam.webgarden.com
Fedora Project Contributor -- Ambassador
https://fedoraproject.org/wiki/User:Freakrobot
_______________________________________________
Chinese mailing list
Chinese at
lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/chinese