【Java】response.getWriter().print("中文")亂碼解決

解決方法是在response.getWriter()前加上response.setContentType("text/html; charset=UTF-8");html

 

//response.setCharacterEncoding("utf-8");單純的這麼設置同樣有亂碼spa

正確作法:htm

response.setContentType("text/html; charset=UTF-8");utf-8

response.getWriter();get

···························it

相關文章
相關標籤/搜索