将msyql设置中文支持
时间:2006-08-01 来源:lilinbinglinux
1. 需要把Table的Type设置成为MyISAM而不是InnoDB。
2. 将Charecter设置成为utf8
就象这样:
create table samples (
id int not null auto_increment,
foo varchar(100) not null,
bar text not null,
primary key (id)
) Type=MyISAM CHARACTER SET utf8;
Class.forName("com.mysql.jdbc.Driver");
Connection con = DriverManager.getConnection("jdbc:mysql://
localhost/test?user=root&password=root&useUnicode=true&characterEncoding=utf8");
2. 将Charecter设置成为utf8
就象这样:
create table samples (
id int not null auto_increment,
foo varchar(100) not null,
bar text not null,
primary key (id)
) Type=MyISAM CHARACTER SET utf8;
Class.forName("com.mysql.jdbc.Driver");
Connection con = DriverManager.getConnection("jdbc:mysql://
localhost/test?user=root&password=root&useUnicode=true&characterEncoding=utf8");
相关阅读 更多 +
- 系统休眠文件删除后果 如何删除计算机的休眠文件 2025-04-22
- 站群服务器是什么意思 站群服务器的作用 站群服务器和普通服务器的区别 2025-04-22
- jQuery插件有何作用 jQuery插件的使用方法 2025-04-22
- jQuery插件有哪些种类 简单的jQuery插件实例 2025-04-22
-