if(roleVo.getRolename() !=null && roleVo.getRolename() !=""){
String name = new String(roleVo.getRolename().getBytes(“ISO8859_1”),“UTF-8”);
roleVo.setRolename(name);
}
if(roleVo.getRoledesc() !=null && roleVo.getRoledesc() !=""){
String desc = new String(roleVo.getRoledesc().getBytes(“ISO8859_1”),“UTF-8”);
roleVo.setRoledesc(desc);
}
在传值来后端接收的时候,利用这个方法转码就可以轻松解决乱码问题了.