html 设置为utf-8格式
<meta http-equiv="content-type" content="text/html;charset=UTF-8">
myeclipse里可以修改jsp编码格式,
request.setCharacterEncoding("UTF-8");
response.setContentType("text/html;charset=UTF-8");
String username = (String)request.getParameter("username");
username = new String(username.getBytes("iso8859-1"),"utf-8");
时间: 2024-10-10 21:44:29