首先是页面的js文件 把含有中文的连接地址做次转码
var url = encodeURIComponent('http://conrol.iteye.com/中文乱码.rar')
后台程序
fileName = new String(fileName.getBytes("ISO8859-1"),"UTF-8");
response.reset();
response.setContentType("bin");
response.addHeader("Content-Disposition", "attachment; filename=\"" + new String(fileName.getBytes("gb2312"),"ISO8859-1") + "\"");