I am trying to export a report to csv using this code:
byte[] csvBytes = AttachmentFileAgent.GetAttachmentFilesCSVBytes(context.Request["appCode"], performingPerson);
context.Response.AddHeader("content-disposition", "attachment; filename=ApplicationReport_" + context.Request["appCode"] + ".csv");
context.Response.ContentType = "text/csv;charset=utf-8";
context.Response.Charset = "utf-8";
context.Response.ContentEncoding = Encoding.UTF8;
context.Response.OutputStream.Write(csvBytes, 0, csvBytes.Length);
But the Hebrew content goes into gibberish ('>' ¢ '>' '¢'> ''> '¢). I tried to use all kinds of coding (UTF8, Unicode, ASCII), but nothing works ...
source
share