mirror of
https://github.com/tuyoogame/YooAsset.git
synced 2026-05-28 19:48:47 +00:00
修复了输出csproject工程文件编码为UTF16的问题
修正BOM问题
This commit is contained in:
@@ -27,12 +27,11 @@ namespace YooAsset.Editor
|
|||||||
var writerSettings = new XmlWriterSettings
|
var writerSettings = new XmlWriterSettings
|
||||||
{
|
{
|
||||||
Indent = true,
|
Indent = true,
|
||||||
Encoding = Encoding.UTF8,
|
Encoding = new UTF8Encoding(false), //无BOM
|
||||||
OmitXmlDeclaration = false
|
OmitXmlDeclaration = false
|
||||||
};
|
};
|
||||||
|
|
||||||
using (var streamWriter = new StreamWriter(memoryStream, Encoding.UTF8))
|
using (var xmlWriter = XmlWriter.Create(memoryStream, writerSettings))
|
||||||
using (var xmlWriter = XmlWriter.Create(streamWriter, writerSettings))
|
|
||||||
{
|
{
|
||||||
xmlDoc.Save(xmlWriter);
|
xmlDoc.Save(xmlWriter);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user