在后台响应前台下载请求时,输出到前台的下载文件名(在FF中显示一大串乱码)
原代码:
String saveAsFileName = URLEncoder.encode(saveAsFileName, "UTF-8");
response.addHeader("Content-Disposition", "attachment;filename="+ saveAsFileName );
改成:
String saveAsFileName = new String(saveAsFileName getBytes("GBK"), "ISO8859_1");
response.addHeader("Content-Disposition", "attachment;filename="+ saveAsFileName );
解决。。。