标签:mat ati urlencode ons eth 中文乱码 control response encoder
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");//.xlsx格式
// response.setContentType("application/application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8");
// response.setContentType("application/vnd.ms-excel");//xls格式
// response.setContentType("application/octet-stream;charset=UTF-8;");
// response.setHeader("Pragma", "no-cache");
// response.setHeader("Cache-Control", "no-cache");
// response.setDateHeader("Expires", 0);
// response.setContentType("application/octet-stream");
// response.setCharacterEncoding("utf-8");
// 这里URLEncoder.encode可以防止中文乱码
response.setCharacterEncoding("utf-8");
response.setContentType("application/json;charset=utf-8");
标签:mat ati urlencode ons eth 中文乱码 control response encoder
原文地址:https://www.cnblogs.com/shihx/p/12971300.html