aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Util.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Util.cs')
-rw-r--r--OpenSim/Framework/Util.cs12
1 files changed, 7 insertions, 5 deletions
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index 58344f3..59159a8 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -69,7 +69,9 @@ namespace OpenSim.Framework
69 69
70 public static readonly Regex UUIDPattern 70 public static readonly Regex UUIDPattern
71 = new Regex("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"); 71 = new Regex("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$");
72 72
73 public static Encoding UTF8 = Encoding.UTF8;
74
73 /// <value> 75 /// <value>
74 /// Well known UUID for the blank texture used in the Linden SL viewer version 1.20 (and hopefully onwards) 76 /// Well known UUID for the blank texture used in the Linden SL viewer version 1.20 (and hopefully onwards)
75 /// </value> 77 /// </value>
@@ -432,7 +434,7 @@ namespace OpenSim.Framework
432 output.Append(": "); 434 output.Append(": ");
433 } 435 }
434 436
435 output.Append(CleanString(Encoding.UTF8.GetString(bytes, 0, bytes.Length - 1))); 437 output.Append(CleanString(Util.UTF8.GetString(bytes, 0, bytes.Length - 1)));
436 } 438 }
437 else 439 else
438 { 440 {
@@ -793,7 +795,7 @@ namespace OpenSim.Framework
793 795
794 public static string Compress(string text) 796 public static string Compress(string text)
795 { 797 {
796 byte[] buffer = Encoding.UTF8.GetBytes(text); 798 byte[] buffer = Util.UTF8.GetBytes(text);
797 MemoryStream memory = new MemoryStream(); 799 MemoryStream memory = new MemoryStream();
798 using (GZipStream compressor = new GZipStream(memory, CompressionMode.Compress, true)) 800 using (GZipStream compressor = new GZipStream(memory, CompressionMode.Compress, true))
799 { 801 {
@@ -827,7 +829,7 @@ namespace OpenSim.Framework
827 decompressor.Read(buffer, 0, buffer.Length); 829 decompressor.Read(buffer, 0, buffer.Length);
828 } 830 }
829 831
830 return Encoding.UTF8.GetString(buffer); 832 return Util.UTF8.GetString(buffer);
831 } 833 }
832 } 834 }
833 835
@@ -1099,7 +1101,7 @@ namespace OpenSim.Framework
1099 { 1101 {
1100 byte[] data = new byte[length]; 1102 byte[] data = new byte[length];
1101 stream.Read(data, 0, length); 1103 stream.Read(data, 0, length);
1102 string strdata = Encoding.UTF8.GetString(data); 1104 string strdata = Util.UTF8.GetString(data);
1103 OSDMap args = null; 1105 OSDMap args = null;
1104 OSD buffer; 1106 OSD buffer;
1105 buffer = OSDParser.DeserializeJson(strdata); 1107 buffer = OSDParser.DeserializeJson(strdata);