aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
index 04f7862..650d9fa 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
@@ -298,14 +298,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
298 try 298 try
299 { 299 {
300 FileInfo fi = new FileInfo(savedState); 300 FileInfo fi = new FileInfo(savedState);
301 int size=(int)fi.Length; 301 int size = (int)fi.Length;
302 if (size < 512000) 302 if (size < 512000)
303 { 303 {
304 using (FileStream fs = File.Open(savedState, 304 using (FileStream fs = File.Open(savedState,
305 FileMode.Open, FileAccess.Read, FileShare.None)) 305 FileMode.Open, FileAccess.Read, FileShare.None))
306 { 306 {
307 System.Text.ASCIIEncoding enc = 307 System.Text.UTF8Encoding enc =
308 new System.Text.ASCIIEncoding(); 308 new System.Text.UTF8Encoding();
309 309
310 Byte[] data = new Byte[size]; 310 Byte[] data = new Byte[size];
311 fs.Read(data, 0, size); 311 fs.Read(data, 0, size);
@@ -899,7 +899,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
899 try 899 try
900 { 900 {
901 FileStream fs = File.Create(Path.Combine(Path.GetDirectoryName(assembly), m_ItemID.ToString() + ".state")); 901 FileStream fs = File.Create(Path.Combine(Path.GetDirectoryName(assembly), m_ItemID.ToString() + ".state"));
902 System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding(); 902 System.Text.UTF8Encoding enc = new System.Text.UTF8Encoding();
903 Byte[] buf = enc.GetBytes(xml); 903 Byte[] buf = enc.GetBytes(xml);
904 fs.Write(buf, 0, buf.Length); 904 fs.Write(buf, 0, buf.Length);
905 fs.Close(); 905 fs.Close();