About garbled characters of dataset file name


(Enginner480907) #1

【Environment】Windows10,Internet Explorer 11,Edge,Google Chrome,Fierfox

【Situation】

I use Piwik in Japanese.

If you download the data set with Internet Explorer 11, Edge, the file name will be garbled.
In Google Chrome, Firefox, file names are not garbled when downloading dataset.

This behavior occurs because Internet Explorer 11, edge treats the string passed in the parameter as the default character code Shift-JIS.

Since you may be able to avoid problems by UrlEncode () the file name as follows, could you please take action?

Response.AppendHeader("Content-Disposition","attachment; filename=" + Server.UrlEncode("日本語.zip"));

Japanese file name garbled on ASP.NET page downloading file