//处理Request request.setCharacterEncoding("utf-8"); String name = request.getParameter("username"); String newName =new String(name.getBytes("iso-8859-1"),"utf-8"); System.out.println("您输入的是:"+newName); //处理Rsponse response.setContentType("text/html;charset=utf-8"); response.setCharacterEncoding("utf-8");
时间: 2024-09-30 06:23:07