求助,java导出word文件时特殊字符乱码
求助,java导出word文件时特殊字符乱码
如姓名,中间的那个点
张三?李四
------解决方案--------------------String wordName =studentName+":"+papername+".doc";
wordName = new String(wordName.getBytes("gb2312"), "ISO8859-1");
this.getResponse().setContentType("application/msword;charset=UTF-8");
getResponse().setHeader("Content-Disposition", "attachment;filename="+wordName);
这样就可以了