解决文件下载时中文名乱码问题
Response.Charset = “GB-2312“;
Response.AppendHeader(“Content-Disposition“, “attachment; filename=“ + HttpUtility.UrlEncode(curResource.ResourceURL));
Response.ContentEncoding=System.Text.Encoding.UTF7;
Response.ContentType = “application/octet-stream“;
Response.TransmitFile(Server.MapPath(StudentHomeManager.DownloadPath + “/“ + curResource.ResourceURL));
Response.End();
Response.AppendHeader(“Content-Disposition“, “attachment; filename=“ + HttpUtility.UrlEncode(curResource.ResourceURL));
Response.ContentEncoding=System.Text.Encoding.UTF7;
Response.ContentType = “application/octet-stream“;
Response.TransmitFile(Server.MapPath(StudentHomeManager.DownloadPath + “/“ + curResource.ResourceURL));
Response.End();
版权声明:本文为sunrack原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。