Java Servlet 非英文乱码

response.setHeader("Content-Type", "text/json; charset=UTF-8");
request.setCharacterEncoding("UTF-8");
response.setCharacterEncoding("UTF-8");

servlet中,这几行一定要放在Servlet最前面,要不然可能失效.

posted @ 2019-03-11 16:29  ラピスラズリ(Dawn)  阅读(218)  评论(0编辑  收藏  举报