Is it possible to force Excel recognize UTF-8 CSV files automatically?

后端 未结 27 1642
醉梦人生
醉梦人生 2020-11-21 22:27

I\'m developing a part of an application that\'s responsible for exporting some data into CSV files. The application always uses UTF-8 because of its multilingual nature at

27条回答
  •  隐瞒了意图╮
    2020-11-21 22:59

    Yes it is possible. When writing the stream creating the csv, the first thing to do is this:

    myStream.Write(Encoding.UTF8.GetPreamble(), 0, Encoding.UTF8.GetPreamble().Length)
    

提交回复
热议问题