希伯來語角色,我想導出包含在我的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();