hi
i have following piece of code:
public void ProcessRequest (HttpContext context)
{
context.Response.ContentType = "text/rtf; charset=UTF-8";
context.Response.Charset = "UTF-8";
context.Response.ContentEncoding = System.Text.Encoding.UTF8;
context.Response.AddHeader("Content-disposition", "attachment;filename=lista_obecnosci.csv");
context.Response.Write("ąęćżźń󳥌ŻŹĆŃŁÓĘ");
}
When i try to open generated csv file, i get following behaviour:
- in notepad2 - everything is fine
- in word - conversion wizzard opens, and asks to convert the text. it suggest utf-8, which is somehow ok
- in excel - i get real mess. none of those polish characters can be displayed.
i wanted to write those special encoding-informatio characters in front of my string - ie.
context.Response.Write((char)0xef);
context.Response.Write((char)0xbb);
context.Response.Write((char)0xbf);
but that won't do any good. the response stream is treating that as normal data and converts it to something different.
I'd appreciate help on this one...
Greg