我有一个网站,它以阿拉伯语存储一些消息。当我尝试将其导出到 csv 或 excel 时,它是什么?. 下面是我用来导出它的代码
public void DownloadCSV(string csvData, string filename)
{
string strFileName = filename;
HttpContext.Current.Response.ClearContent();
HttpContext.Current.Response.AddHeader("content-disposition", "attachment; filename=" + strFileName);
HttpContext.Current.Response.ContentEncoding = System.Text.Encoding.GetEncoding("iso-8859-2");
HttpContext.Current.Response.ContentType = "application/vnd.ms-excel";
HttpContext.Current.Response.Write(csvData);
HttpContext.Current.Response.Flush();
HttpContext.Current.Response.End();
}
怎么能解决这个问题。提前致谢