文件下载 中文名字编码问题

解决方式

response.reset();  
response.setContentType("application/octet-stream");  
response.setCharacterEncoding("utf-8");
response.setContentLength(Integer.parseInt(documentManager.getFileSize()));
String title = documentManager.getFileName().concat(".").concat(documentManager.getFileType());
response.setHeader("Content-disposition", "attachment;filename=" + new String(title.getBytes("UTF-8"),"iso-8859-1"));

你可能感兴趣的:(文件下载 中文名字编码问题)