上海象屿地产工作怎么:jsp在调试的时候出现了乱码
来源:百度文库 编辑:中科新闻网 时间:2024/10/05 11:44:09
jsp在调试的时候出现了乱码,
请问怎么回事?
请问怎么回事?
中文乱码很正常,用进行编码转换
public String toChinese(String strvalue) {
try{
if(strvalue==null)
return null;
else
{
strvalue = new String(strvalue.getBytes("ISO8859_1"), "GBK");
return strvalue;
}
}catch(Exception e){
return null;
}
}