把页面的编码与数据的编码统一的两种方法:
把页面的编码与数据的编码统一的两种方法:
1 //字符编码的转换(1) 2 /* String url="jdbc:odbc:DRIVER={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=D:/student.accdb?useUnicode=true&characterEncoding=GB2312"; */
1 //字符转换(2) 2 /* name = new String(name.getBytes("x-sjis"),"GBK"); 3 fromw = new String(fromw.getBytes("x-sjis"),"GBK"); 4 school = new String(school.getBytes("x-sjis"),"GBK"); 5 major = new String(major.getBytes("x-sjis"),"GBK"); */