String llq = request.getHeader( "USER-AGENT" ).toLowerCase();
Boolean isIE = false;
if (llq.indexOf("msie") > -1 || llq.indexOf("rv:11") > -1) {
isIE = true;
}
if(isIE) {
fileName = URLEncoder.encode(fileName, "UTF-8"); //ie用这个
}else{
fileName = new String(fileName.getBytes("UTF-8"), "ISO8859-1"); //不是ie用这个
}
response.setHeader("Content-disposition", "attachment; filename="
+ fileName);