C# 保存文件为没有bom头的utf-8编码格式
var utf8WithoutBom = new UTF8Encoding(false);
StreamWriter writer = new StreamWriter(stream, utf8WithoutBom);
//写文件内容的操作
//......
writer.Close();
var utf8WithoutBom = new UTF8Encoding(false);
StreamWriter writer = new StreamWriter(stream, utf8WithoutBom);
//写文件内容的操作
//......
writer.Close();