<span>JavaWeb插入中文到Mysql数据库中文变成问号??</span>
连接数据库时,在url后面添加参数
?useUnicode=true&characterEncoding=utf-8
DriverManager.getConnection("jdbc:mysql://localhost:3306/smbms?useUnicode=true&characterEncoding=utf-8", "root", "12345");
?useUnicode=true&characterEncoding=utf-8
DriverManager.getConnection("jdbc:mysql://localhost:3306/smbms?useUnicode=true&characterEncoding=utf-8", "root", "12345");
相关推荐