需要将指定字符串的编码转换成浏览器里面的ISO-8859-1编码

String name = new String(name.getBtes("utf-8"),"ISO-8859-1");

示例:
response.setContentType("application/octet-stream"); response.setHeader("content-disposition", "attachement;filename=" + new String(fileInfo.getFileName().getBytes("utf-8"), "ISO-8859-1"));

 

 

相关文章:

  • 2022-12-23
  • 2021-08-13
  • 2021-07-08
  • 2022-02-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-04
  • 2021-11-22
  • 2022-12-23
  • 2021-12-11
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案