Response乱码的解决方法

protected void doPost(HttpServletRequest request, HttpServletResponse response)   
  
    throws ServletException, IOException {  
//告诉servlet用UTF-8转码 request.setCharacterEncoding("UTF-8"); response.setCharacterEncoding("UTF-8");
//浏览器用utf8来解析返回的数据  response.setContentType("text/html; charset=UTF-8"); }

  

原文地址:https://www.cnblogs.com/taiguyiba/p/6119595.html