String agent = this.getRequest().getHeader("User-Agent");
if(null == filename || null == agent){
return _filename;
}
if(agent.toLowerCase().contains("firefox")){
_filename = filename;
}else {//非火狐浏览器
try {
_filename = new String(filename.getBytes("ISO8859-1"),"UTF-8");
_filename = java.net.URLEncoder.encode(filename, "UTF-8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
return filename;
}
}
return _filename;
linux 导出文件名乱码
最新推荐文章于 2024-05-22 10:05:14 发布