解决乱码问题
先使用 ISO-8859-1 类型解码,再使用 UTF-8 类型编码
String username = request.getParameter("username"); byte[] bytes = username.getBytes("iso-8859-1"); username = new String(bytes, "utf-8");