记录一下该问题的解决方法,有同事说已经验证可行,我还没空验证,先记录下来
int fileSize=输出流大小;
string fileName=文件名;
Encoding gb2312 = Encoding.GetEncoding("gb2312");
fileName = gb2312.GetString(Encoding.Convert(Encoding.Unicode, gb2312, Encoding.Unicode.GetBytes(fileName)));
Response.HeaderEncoding = Encoding.GetEncoding("gb2312");
Response.Clear();
Response.ClearHeaders();
Response.Buffer = false;
Response.ContentType =GetContentType(fileType);
Response.AddHeader("Content-Disposition", "attachment; filename=\"" + fileName + "\"");
Response.AddHeader("Content-Length", fileSize);
byte[] buf = FileContent(输出流)
Response.BinaryWrite(buf);
Response.Flush();
Response.End();