这是部分代码
response.setContentType("application/msword");
String uncod= URLDecoder.decode(fileName);
fileName = new String(uncod.getBytes("UTF-8"), "UTF-8");
response.setHeader("Content-Disposition", "attachment;filename=".concat(String.valueOf(fileName)));
这样写中文会丢失
改成如下
fileName = new String(uncod.getBytes(), "ISO-8859-1");
便可解决