Author: sukumarraju | Posted on: 2/10/2011 10:22:17 AM | Views : 312

Hello there,
While exporting data from DataTable to CSV file 'characters' from Poland, France, Germany and Russia are being replaced with funny characters. To get rid of the problem, ISO-8859-1, IS0-8859-2 has been used with no resolution.
HttpContext context = HttpContext.Current; context.Response.Clear(); context.Response.ContentType = "text/csv"; context.Response.AppendHeader("Content-Disposition", "attachment; filename=" + fileName + ".csv"); context.Response.Charset = ""; //Below one is an issue context.Response.ContentEncoding = System.Text.Encoding.GetEncoding("ISO-8859-1");


Help is appreciated.

...

Go to the complete details ...