避免代码乱码要注意的几点,1.建立的数据库使用
jdbc:mysql://localhost:3306/asking?useUnicode=true&characterEncoding=utf-8
create database if not exists helloworld default character set utf8;
create table if not exists testpp(
id int(11) auto_increment primary key,
name varchar(25) not null,
address varchar(80),
registe_date date
)engine=InnoDB DEFAULT CHARSET=utf8;
insert into testpp values (1,'姓名','地址:上海,杭州,北京',now());
阅读(743) | 评论(0) | 转发(0) |