保存xml报错 'UTF_8' is not a supported encoding name

ArgumentException: 'UTF_8' is not a supported encoding name. For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method.
var doc=new XmlDocument();
XmlDeclaration declaration = doc.CreateXmlDeclaration("1.0","UTF_8",null);//unity 2018.3.0f2 改为 UTF-8
doc.AppendChild(declaration);
原文地址:https://www.cnblogs.com/kingBook/p/10346157.html