fileName = new String(fileName.getBytes("ISO8859-1"), "UTF-8");

 

 

或者

       String finalFileName = null; 

       if(StringUtils.contains(userAgent, "MSIE")){//IE浏览器  

             finalFileName = URLEncoder.encode(fileName,"UTF8");  

        }else if(StringUtils.contains(userAgent, "Mozilla")){//google,火狐浏览器     
 finalFileName = new String(fileName.getBytes(), "ISO8859-1"); 
}else{
       finalFileName = URLEncoder.encode(fileName,"UTF8");//其他浏览器 }

 

相关文章:

  • 2022-01-03
  • 2022-12-23
  • 2022-12-23
  • 2021-12-13
  • 2022-12-23
  • 2021-08-17
  • 2021-07-17
  • 2021-08-17
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-15
  • 2021-12-07
  • 2022-12-23
  • 2021-11-19
相关资源
相似解决方案