时间:2021-07-01 10:21:17 帮助过:20人阅读
修改server.xml中的
另外HttpURLConnection上传参数的时候要转码成url编码
outStream.writeBytes("&" + URLEncoder.encode(key, "utf-8") + "=" + URLEncoder.encode(value, "utf-8"));
修改 my.cnf ,在 [mysqld] 下面添加
character-set-server = utf8
创建数据库的时候制定编码格式为 utf-8
CREATE DATABASE dbname DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
或者修改已有数据库/表编码格式为 utf-8
ALTER DATABASE databasename CHARACTER SET utf8 COLLATE utf8_unicode_ci;ALTER TABLE tablename CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;