Use POI to export Excel, the file name is Chinese garbled:
String fileName = "_费率-" + DateUtil.DateToStr(new Date());
response.setCharacterEncoding("UTF-8");
response.setContentType("application/vnd.ms-excel");
response.setHeader("content-disposition",
"attachment;filename=" +
new String(fileName.getBytes("utf-8"),"ISO-8859-1" )+ ".xls");
Try solutions:
fileName = URLEncoder.encode(fileName, "UTF-8");
fileName = new String(this.fileName.getBytes("utf-8"),"ISO-8859-1");