在下载的程序中加入下列代码即可解决:
Boolean flag = request.getHeader("User-Agent").indexOf("like Gecko") > 0;
//IE的话,通过URLEncoder对filename进行UTF8编码。而其他的浏览器(firefox、chrome、safari、opera),则要通过字节转换成ISO8859-1了。
if (request.getHeader("User-Agent").toUpperCase().indexOf("MSIE") > 0 || flag) {
filename = URLEncoder.encode(filename, "UTF-8");
//解决Internet Explorer无法打开该Internet站点.请求的站点不可用,或找不到.请以后再试
response.setHeader("Content-Transfer-Encoding","binary");
response.setHeader("Cache-Control", "must-revalidate, post-check=0, pre-check=0");
response.setHeader("Pragma", "public");
} else {
filename = new String(filename.getBytes("UTF-8"), "ISO8859-1");
}