I am using HttpContext object implemented in HttpHandler child to download a file, when I have non-ascii characters in file name it looks weird in IE whereas it looks fine in Firefox.
below is the code:-
context.Response.ContentType = ".cs";
context.Response.AppendHeader("Content-Length", data.Length.ToString());
context.Response.AppendHeader("Content-Disposition", String.Format("attachment; filename={0}",filename));
context.Response.OutputStream.Write(data, 0, data.Length);
context.Response.Flush();
when I supply '??' '?¤' '??' '??' '?3' '??' '?¤' '??' '??' '?3' in file name field it looks different than what I have in file name it looks fine in firefox. adding EncodingType and charset has been of no use.
In ie it is '????''???¤''????''????''???3''????''???¤''????''????'_'???3' and in firefox it is '??' '?¤' '??' '??' '?3' '??' '?¤' '??' '??' '?3'.
Any Idea how this can be fixed?
See Question&Answers more detail:os