2019-05-22 11:41

getResponse().setHeader("jfinal_123", "text/plain;charset=gb2312"); 这样写后
头信息是这样的:
Cache-Control:no-cache
Connection:keep-alive
Content-Length:152
Content-Type:text/plain;charset=UTF-8
Date:Wed, 22 May 2019 03:20:24 GMT
Expires:Thu, 01 Jan 1970 00:00:00 GMT
jfinal_123:text/plain;charset=gb2312
Pragma:no-cache
Server:JFinal

2019-05-22 10:52

controller里改变 reader 的CharacterEncoding 应该怎么写?现在调用的都是默认的 UTF-8

2019-05-22 10:45

用 getResponse().setContentType("text/plain;charset=gb2312");
前端跟踪http header 里的 Content-Type 信息还是:Content-Type:text/plain;charset=UTF-8