(1)fileName = URLEncoder.encode(filename,"UTF-8")
(2)String fileName = new String(fileName.getBytes("ISO-8859-1"),"UTF-8")
如果window与Linux中文乱码位置不同,
方法: 给该Tomcat本地中conf下server.xml,将相对应端口下加上URLEncoding="GBK"
原因: 将配置环境与服务器更改一致
(1)fileName = URLEncoder.encode(filename,"UTF-8")
(2)String fileName = new String(fileName.getBytes("ISO-8859-1"),"UTF-8")
如果window与Linux中文乱码位置不同,
方法: 给该Tomcat本地中conf下server.xml,将相对应端口下加上URLEncoding="GBK"
原因: 将配置环境与服务器更改一致