SetCharacterEncoding
- response.setCharactorEncoding必须要在创建输出流之前,否则将会没有效果
- 使用方法
//这两个方法必须同时使用,并且必须先使用setContendType response.setContentType("text/html "); response.setCharacterEncoding("utf-8");
- 所以最好不要使用,而是用下面的方法
setContendType
- response.setContentType("text/html;charset=Utf-8"); MIME类型(比如:video/mp4,imge/jpg).
-
响应的乱码解决方法用这个就好