mirror of
https://github.com/opensim/opensim.git
synced 2026-07-04 18:15:56 +08:00
Rather than instantiating a UTF8 encoding everywhere when we want to supress the BOM, use a single Util.UTF8NoBomEncoding.
This class is thread-safe (as evidenced by the provision of the system-wide Encoding.UTF8 which does not suppress BOM on output).
This commit is contained in:
@@ -952,7 +952,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
|
||||
try
|
||||
{
|
||||
FileStream fs = File.Create(Path.Combine(Path.GetDirectoryName(assembly), ItemID.ToString() + ".state"));
|
||||
Byte[] buf = (new UTF8Encoding()).GetBytes(xml);
|
||||
Byte[] buf = Util.UTF8NoBomEncoding.GetBytes(xml);
|
||||
fs.Write(buf, 0, buf.Length);
|
||||
fs.Close();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user