解决浏览器导出Excel文件名乱码问题

导出的时候需要设置:

response.setHeader("Content-Disposition", "attachment;filename*=utf-8'zh_cn'" + URLEncoder.encode(fileName,"UTF-8"));

导出文件用这种方式设置文件名在所有浏览器下才不会乱码

rfc2231的规范:

https://tools.ietf.org/html/rfc2231

猜你喜欢

转载自blog.csdn.net/qq_36807862/article/details/84133788