RSS-2.0

Dot Net KB

  • Export CSV with unicode content

    You've got an encoding issue. The default encoding for StreamWriter is UTF8NoBOM. That encoding should properly encode Unicode characters. Your problem is likely located in the app you use to read the file. Maybe you can egg it into interpreting the file properly if it contains a BOM (byte order mark). Construct it like this:

    new System.IO.StreamWriter(fileName, Encoding.UTF8);

    Read more...
    1/25/2008 2:21:00 AM Published by FengLiN Category ASP.NET Comments 0 Views (465)