如果我从 IE 11 下载文件,文件名中的日语字符会变成垃圾

Japenese character in a filename changes to garbage if I download file from IE 11

如果我下载了一个以日文字符作为文件名的文件,那么它就会在 IE 11 中变成一些垃圾语言。

我找到了解决方案,在这里,我在文件名上使用了 UrlEncode,这帮助我解决了我的问题。

Response.AddHeader("Content-Disposition", String.Format("attachment; filename={0}", HttpUtility.UrlEncode(docFileDTO.FileName)));