sqlConn = java.sql.DriverManager.getConnection("jdbc:mysql://localhost/cfan_d
b?useUnicode=true&characterEncoding=ISO-8859-1","cfan","cfanpasswd");关键那个编码
b?useUnicode=true&characterEncoding=ISO-8859-1","cfan","cfanpasswd");关键那个编码
useUnicode=true&characterEncoding=gb2312
应该是用iso-8859-1是吗?
现在从jsp往mysql写数据,在mysql中看已经是中文了但是在jsp中查询后显出来的还是乱码,从??变成乱码了
可怜的孩子~
一定要记得用utf-8的编码格式
要不一定会有乱码的
<%@ page contentType="text/html; charset=utf-8"%>