When you try to export a CSV file from ASP.NET that contains special characters like é å æ É à you may experience the following:
- Opening the file in Notepad shows the correct characters
- Opening the file in Excel, it shows characters like Ã© Ã¥ Ã¦ Ã‰ Ã
This also causes problems when you try to import this file in to CRM using the standard data imports.
To solve this issue you will have to use the correct encoding during the export of the file.
Imagine you have used a StringBuilder to generate the CSV file content.
Response.ContentType = “application/csv”;
Response.Charset = “”;
Response.ContentEncoding = Encoding.Unicode;