一串?是转多了,你试试new String("GB2313","ISO8859-1");
不行的话,你要检查一下(jsp到bean到......)流程看看那里有转换仔细分析一下了。
new String("GB2313","ISO8859-1");转换到ISO8859-1编码的
new String(byteBuffer,"GB2312");转换到gb2312编码的
有关的还有数据库的编码方式。仔细分析一下吧。
不行的话,你要检查一下(jsp到bean到......)流程看看那里有转换仔细分析一下了。
new String("GB2313","ISO8859-1");转换到ISO8859-1编码的
new String(byteBuffer,"GB2312");转换到gb2312编码的
有关的还有数据库的编码方式。仔细分析一下吧。
new String(strBuffer.getBytes("GB2313"),"ISO8859-1");
new String(strBuffer.getBytes("ISO8859-1"),"GB2312");
try {
String temp_p = str;
byte[] temp_t = temp_p.getBytes("ISO8859-1");
String temp = new String(temp_t);
return temp;
}
catch (Exception e) {
e.printStackTrace();
}
return "null";
}