希伯来语角色,我想导出包含在我的ASP.net MVC应用程序我想导出包含在我的ASP.net MVC应用程序
我已经尝试了很多编码,但无法工作希伯来文字符CSV文件CSV文件。其实希伯来字符,并不显示它们。
任何人都有想法吗?
System.Text.UnicodeEncoding Enc = new UnicodeEncoding();
HttpContext.Current.Response.AddHeader("Content-Length", Enc.GetByteCount(strExport).ToString());
HttpContext.Current.Response.BinaryWrite(Enc.GetBytes(strExport));
HttpContext.Current.Response.ContentEncoding = System.Text.Encoding.GetEncoding("windows-1255");
//HttpContext.Current.Response.Charset = "iso-8859-8";
HttpContext.Current.Response.ContentType = "text/csv";
HttpContext.Current.Response.AddHeader("content-disposition", string.Format("attachment;inline; filename={0}.csv", fileName));
HttpContext.Current.Response.End();