* IniConfig: 增加文件编码

This commit is contained in:
Sunny 2024-01-05 21:05:04 +08:00
parent 00c6424e58
commit 2f5b07c87b

View File

@ -185,7 +185,7 @@ namespace Sunny.UI
DirEx.CreateDir(Path.GetDirectoryName(filename)); DirEx.CreateDir(Path.GetDirectoryName(filename));
string filetmp = filename + "." + RandomEx.RandomPureChar(3); string filetmp = filename + "." + RandomEx.RandomPureChar(3);
File.Delete(filetmp); File.Delete(filetmp);
StreamWriter sw = new StreamWriter(filetmp); StreamWriter sw = new StreamWriter(filetmp, false, IniEncoding);
sw.WriteLine(strs.ToString()); sw.WriteLine(strs.ToString());
sw.Flush(); sw.Flush();
sw.Close(); sw.Close();