firefox 下 excel 导出 下载文件名乱码优化
This commit is contained in:
@@ -566,7 +566,7 @@ public class ExcelExport implements Closeable{
|
|||||||
public ExcelExport write(HttpServletResponse response, String fileName){
|
public ExcelExport write(HttpServletResponse response, String fileName){
|
||||||
response.reset();
|
response.reset();
|
||||||
response.setContentType("application/octet-stream; charset=utf-8");
|
response.setContentType("application/octet-stream; charset=utf-8");
|
||||||
response.setHeader("Content-Disposition", "attachment; filename="+EncodeUtils.encodeUrl(fileName));
|
response.addHeader("Content-Disposition", "attachment; filename*=utf-8'zh_cn'"+EncodeUtils.encodeUrl(fileName));
|
||||||
try {
|
try {
|
||||||
write(response.getOutputStream());
|
write(response.getOutputStream());
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
|
|||||||
Reference in New Issue
Block a user