String userName = request.getParameter("userName ");
userName =new String(userName .getBytes(“ISO-8859-1”),“utf-8”);
或者三步:
String userName=request.getParameter(“userName”);
byte b[]=userName.getBytes(“ISO-8859-1”);
userName=new String(b,“utf-8”);
//最后要做异常处理