最后这样设置即可
response.setContentType(mine+"; charset=gb2312");
response.setHeader("Content-disposition", (new StringBuilder()).append("attachment;filename=\"").append(new String(name.getBytes("GBK"), "ISO8859_1")).append("\"").toString());
Java下载程序中获取MIME类型大全(2)
内容版权声明:除非注明,否则皆为本站原创文章。