如代码:
string content = File.ReadAllText(path, Encoding.Default); File.WriteAllText(path, content, Encoding.UTF8);