diff options
Diffstat (limited to 'OpenSim/Region')
13 files changed, 24 insertions, 24 deletions
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index 468c5d7..6e7a2a0 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs | |||
@@ -699,7 +699,7 @@ namespace OpenSim | |||
699 | public byte[] Handle(string path, Stream request, | 699 | public byte[] Handle(string path, Stream request, |
700 | OSHttpRequest httpRequest, OSHttpResponse httpResponse) | 700 | OSHttpRequest httpRequest, OSHttpResponse httpResponse) |
701 | { | 701 | { |
702 | return Encoding.UTF8.GetBytes("OK"); | 702 | return Util.UTF8.GetBytes("OK"); |
703 | } | 703 | } |
704 | 704 | ||
705 | public string ContentType | 705 | public string ContentType |
@@ -736,7 +736,7 @@ namespace OpenSim | |||
736 | public byte[] Handle(string path, Stream request, | 736 | public byte[] Handle(string path, Stream request, |
737 | OSHttpRequest httpRequest, OSHttpResponse httpResponse) | 737 | OSHttpRequest httpRequest, OSHttpResponse httpResponse) |
738 | { | 738 | { |
739 | return Encoding.UTF8.GetBytes(m_opensim.StatReport(httpRequest)); | 739 | return Util.UTF8.GetBytes(m_opensim.StatReport(httpRequest)); |
740 | } | 740 | } |
741 | 741 | ||
742 | public string ContentType | 742 | public string ContentType |
@@ -777,7 +777,7 @@ namespace OpenSim | |||
777 | public byte[] Handle(string path, Stream request, | 777 | public byte[] Handle(string path, Stream request, |
778 | OSHttpRequest httpRequest, OSHttpResponse httpResponse) | 778 | OSHttpRequest httpRequest, OSHttpResponse httpResponse) |
779 | { | 779 | { |
780 | return Encoding.UTF8.GetBytes(m_opensim.StatReport(httpRequest)); | 780 | return Util.UTF8.GetBytes(m_opensim.StatReport(httpRequest)); |
781 | } | 781 | } |
782 | 782 | ||
783 | public string ContentType | 783 | public string ContentType |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 3b43771..0052729 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -4751,7 +4751,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4751 | { | 4751 | { |
4752 | Hashtable mp = (Hashtable)simMapProfiles[iii]; | 4752 | Hashtable mp = (Hashtable)simMapProfiles[iii]; |
4753 | mbReply.Data[iii] = new MapBlockReplyPacket.DataBlock(); | 4753 | mbReply.Data[iii] = new MapBlockReplyPacket.DataBlock(); |
4754 | mbReply.Data[iii].Name = System.Text.Encoding.UTF8.GetBytes((string)mp["name"]); | 4754 | mbReply.Data[iii].Name = Util.UTF8.GetBytes((string)mp["name"]); |
4755 | mbReply.Data[iii].Access = System.Convert.ToByte(mp["access"]); | 4755 | mbReply.Data[iii].Access = System.Convert.ToByte(mp["access"]); |
4756 | mbReply.Data[iii].Agents = System.Convert.ToByte(mp["agents"]); | 4756 | mbReply.Data[iii].Agents = System.Convert.ToByte(mp["agents"]); |
4757 | mbReply.Data[iii].MapImageID = new UUID((string)mp["map-image-id"]); | 4757 | mbReply.Data[iii].MapImageID = new UUID((string)mp["map-image-id"]); |
@@ -7341,7 +7341,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
7341 | } | 7341 | } |
7342 | #endregion | 7342 | #endregion |
7343 | 7343 | ||
7344 | string mapName = Encoding.UTF8.GetString(map.NameData.Name, 0, | 7344 | string mapName = Util.UTF8.GetString(map.NameData.Name, 0, |
7345 | map.NameData.Name.Length - 1); | 7345 | map.NameData.Name.Length - 1); |
7346 | handlerMapNameRequest = OnMapNameRequest; | 7346 | handlerMapNameRequest = OnMapNameRequest; |
7347 | if (handlerMapNameRequest != null) | 7347 | if (handlerMapNameRequest != null) |
diff --git a/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs b/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs index a0f359b..7456e8c 100644 --- a/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs +++ b/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs | |||
@@ -257,7 +257,7 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender | |||
257 | stringResult.AppendFormat("{0}|{1}|{2}{3}", Layers[i].Start, Layers[i].End, Layers[i].End - Layers[i].Start, strEnd); | 257 | stringResult.AppendFormat("{0}|{1}|{2}{3}", Layers[i].Start, Layers[i].End, Layers[i].End - Layers[i].Start, strEnd); |
258 | } | 258 | } |
259 | 259 | ||
260 | layerDecodeAsset.Data = Encoding.UTF8.GetBytes(stringResult.ToString()); | 260 | layerDecodeAsset.Data = Util.UTF8.GetBytes(stringResult.ToString()); |
261 | 261 | ||
262 | #endregion Serialize Layer Data | 262 | #endregion Serialize Layer Data |
263 | 263 | ||
@@ -280,7 +280,7 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender | |||
280 | { | 280 | { |
281 | #region Deserialize Layer Data | 281 | #region Deserialize Layer Data |
282 | 282 | ||
283 | string readResult = Encoding.UTF8.GetString(layerDecodeAsset.Data); | 283 | string readResult = Util.UTF8.GetString(layerDecodeAsset.Data); |
284 | string[] lines = readResult.Split(new char[] { '\n' }, StringSplitOptions.RemoveEmptyEntries); | 284 | string[] lines = readResult.Split(new char[] { '\n' }, StringSplitOptions.RemoveEmptyEntries); |
285 | 285 | ||
286 | if (lines.Length == 0) | 286 | if (lines.Length == 0) |
diff --git a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs index 50d7c97..45e724d 100644 --- a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs +++ b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs | |||
@@ -367,7 +367,7 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest | |||
367 | // Encode outbound data | 367 | // Encode outbound data |
368 | if (OutboundBody.Length > 0) | 368 | if (OutboundBody.Length > 0) |
369 | { | 369 | { |
370 | byte[] data = Encoding.UTF8.GetBytes(OutboundBody); | 370 | byte[] data = Util.UTF8.GetBytes(OutboundBody); |
371 | 371 | ||
372 | Request.ContentLength = data.Length; | 372 | Request.ContentLength = data.Length; |
373 | Stream bstream = Request.GetRequestStream(); | 373 | Stream bstream = Request.GetRequestStream(); |
@@ -390,7 +390,7 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest | |||
390 | if (count != 0) | 390 | if (count != 0) |
391 | { | 391 | { |
392 | // translate from bytes to ASCII text | 392 | // translate from bytes to ASCII text |
393 | tempString = Encoding.UTF8.GetString(buf, 0, count); | 393 | tempString = Util.UTF8.GetString(buf, 0, count); |
394 | 394 | ||
395 | // continue building the string | 395 | // continue building the string |
396 | sb.Append(tempString); | 396 | sb.Append(tempString); |
diff --git a/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/LLRAW.cs b/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/LLRAW.cs index 3eb7cd2..a70ef13 100644 --- a/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/LLRAW.cs +++ b/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/LLRAW.cs | |||
@@ -36,10 +36,10 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FileLoaders | |||
36 | { | 36 | { |
37 | public struct HeightmapLookupValue : IComparable<HeightmapLookupValue> | 37 | public struct HeightmapLookupValue : IComparable<HeightmapLookupValue> |
38 | { | 38 | { |
39 | public int Index; | 39 | public ushort Index; |
40 | public double Value; | 40 | public float Value; |
41 | 41 | ||
42 | public HeightmapLookupValue(int index, double value) | 42 | public HeightmapLookupValue(ushort index, float value) |
43 | { | 43 | { |
44 | Index = index; | 44 | Index = index; |
45 | Value = value; | 45 | Value = value; |
@@ -62,7 +62,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FileLoaders | |||
62 | { | 62 | { |
63 | for (int j = 0; j < 256; j++) | 63 | for (int j = 0; j < 256; j++) |
64 | { | 64 | { |
65 | LookupHeightTable[i + (j * 256)] = new HeightmapLookupValue(i + (j * 256), ((double)i * ((double)j / 128.0d))); | 65 | LookupHeightTable[i + (j * 256)] = new HeightmapLookupValue((ushort)(i + (j * 256)), (float)((double)i * ((double)j / 128.0d))); |
66 | } | 66 | } |
67 | } | 67 | } |
68 | Array.Sort<HeightmapLookupValue>(LookupHeightTable); | 68 | Array.Sort<HeightmapLookupValue>(LookupHeightTable); |
@@ -196,7 +196,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FileLoaders | |||
196 | 196 | ||
197 | // The lookup table is pre-sorted, so we either find an exact match or | 197 | // The lookup table is pre-sorted, so we either find an exact match or |
198 | // the next closest (smaller) match with a binary search | 198 | // the next closest (smaller) match with a binary search |
199 | index = Array.BinarySearch<HeightmapLookupValue>(LookupHeightTable, new HeightmapLookupValue(0, t)); | 199 | index = Array.BinarySearch<HeightmapLookupValue>(LookupHeightTable, new HeightmapLookupValue(0, (float)t)); |
200 | if (index < 0) | 200 | if (index < 0) |
201 | index = ~index - 1; | 201 | index = ~index - 1; |
202 | 202 | ||
diff --git a/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs b/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs index 080bd5a..4df9094 100644 --- a/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs +++ b/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs | |||
@@ -352,7 +352,7 @@ namespace OpenSim.Region.DataSnapshot | |||
352 | m_log.WarnFormat("[DATASNAPSHOT]: Unable to decode reply from data service. Ignoring. {0}", e.StackTrace); | 352 | m_log.WarnFormat("[DATASNAPSHOT]: Unable to decode reply from data service. Ignoring. {0}", e.StackTrace); |
353 | } | 353 | } |
354 | // This is not quite working, so... | 354 | // This is not quite working, so... |
355 | // string responseStr = Encoding.UTF8.GetString(response); | 355 | // string responseStr = Util.UTF8.GetString(response); |
356 | m_log.Info("[DATASNAPSHOT]: data service notified: " + url); | 356 | m_log.Info("[DATASNAPSHOT]: data service notified: " + url); |
357 | } | 357 | } |
358 | 358 | ||
diff --git a/OpenSim/Region/Framework/Scenes/RegionStatsHandler.cs b/OpenSim/Region/Framework/Scenes/RegionStatsHandler.cs index 73f918e..e9660b1 100644 --- a/OpenSim/Region/Framework/Scenes/RegionStatsHandler.cs +++ b/OpenSim/Region/Framework/Scenes/RegionStatsHandler.cs | |||
@@ -73,7 +73,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
73 | 73 | ||
74 | public byte[] Handle(string path, Stream request, OSHttpRequest httpRequest, OSHttpResponse httpResponse) | 74 | public byte[] Handle(string path, Stream request, OSHttpRequest httpRequest, OSHttpResponse httpResponse) |
75 | { | 75 | { |
76 | return Encoding.UTF8.GetBytes(Report()); | 76 | return Util.UTF8.GetBytes(Report()); |
77 | } | 77 | } |
78 | 78 | ||
79 | public string ContentType | 79 | public string ContentType |
diff --git a/OpenSim/Region/Framework/Scenes/TerrainChannel.cs b/OpenSim/Region/Framework/Scenes/TerrainChannel.cs index 8209ff6..ca6210d 100644 --- a/OpenSim/Region/Framework/Scenes/TerrainChannel.cs +++ b/OpenSim/Region/Framework/Scenes/TerrainChannel.cs | |||
@@ -172,7 +172,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
172 | public string SaveToXmlString() | 172 | public string SaveToXmlString() |
173 | { | 173 | { |
174 | XmlWriterSettings settings = new XmlWriterSettings(); | 174 | XmlWriterSettings settings = new XmlWriterSettings(); |
175 | settings.Encoding = Encoding.UTF8; | 175 | settings.Encoding = Util.UTF8; |
176 | using (StringWriter sw = new StringWriter()) | 176 | using (StringWriter sw = new StringWriter()) |
177 | { | 177 | { |
178 | using (XmlWriter writer = XmlWriter.Create(sw, settings)) | 178 | using (XmlWriter writer = XmlWriter.Create(sw, settings)) |
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index ee2d2db..4364627 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs | |||
@@ -81,7 +81,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server | |||
81 | { | 81 | { |
82 | m_log.Info("[IRCd] Sending >>> " + command); | 82 | m_log.Info("[IRCd] Sending >>> " + command); |
83 | 83 | ||
84 | byte[] buf = Encoding.UTF8.GetBytes(command + "\r\n"); | 84 | byte[] buf = Util.UTF8.GetBytes(command + "\r\n"); |
85 | 85 | ||
86 | m_client.GetStream().BeginWrite(buf, 0, buf.Length, SendComplete, null); | 86 | m_client.GetStream().BeginWrite(buf, 0, buf.Length, SendComplete, null); |
87 | } | 87 | } |
@@ -109,7 +109,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server | |||
109 | byte[] buf = new byte[8]; // RFC1459 defines max message size as 512. | 109 | byte[] buf = new byte[8]; // RFC1459 defines max message size as 512. |
110 | 110 | ||
111 | int count = m_client.GetStream().Read(buf, 0, buf.Length); | 111 | int count = m_client.GetStream().Read(buf, 0, buf.Length); |
112 | string line = Encoding.UTF8.GetString(buf, 0, count); | 112 | string line = Util.UTF8.GetString(buf, 0, count); |
113 | 113 | ||
114 | strbuf += line; | 114 | strbuf += line; |
115 | 115 | ||
diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs index c7bb56a..b04b076 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs | |||
@@ -559,7 +559,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
559 | 559 | ||
560 | if (method == "POST") | 560 | if (method == "POST") |
561 | { | 561 | { |
562 | byte[] contentreq = Encoding.UTF8.GetBytes(body); | 562 | byte[] contentreq = Util.UTF8.GetBytes(body); |
563 | forwardreq.ContentLength = contentreq.Length; | 563 | forwardreq.ContentLength = contentreq.Length; |
564 | Stream reqStream = forwardreq.GetRequestStream(); | 564 | Stream reqStream = forwardreq.GetRequestStream(); |
565 | reqStream.Write(contentreq, 0, contentreq.Length); | 565 | reqStream.Write(contentreq, 0, contentreq.Length); |
@@ -567,7 +567,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
567 | } | 567 | } |
568 | 568 | ||
569 | HttpWebResponse fwdrsp = (HttpWebResponse)forwardreq.GetResponse(); | 569 | HttpWebResponse fwdrsp = (HttpWebResponse)forwardreq.GetResponse(); |
570 | Encoding encoding = Encoding.UTF8; | 570 | Encoding encoding = Util.UTF8; |
571 | StreamReader fwdresponsestream = new StreamReader(fwdrsp.GetResponseStream(), encoding); | 571 | StreamReader fwdresponsestream = new StreamReader(fwdrsp.GetResponseStream(), encoding); |
572 | fwdresponsestr = fwdresponsestream.ReadToEnd(); | 572 | fwdresponsestr = fwdresponsestream.ReadToEnd(); |
573 | fwdresponsecontenttype = fwdrsp.ContentType; | 573 | fwdresponsecontenttype = fwdrsp.ContentType; |
diff --git a/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs b/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs index 3044b17..e3fbb6e 100644 --- a/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs +++ b/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs | |||
@@ -539,7 +539,7 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator | |||
539 | { | 539 | { |
540 | XmlSerializer xs = new XmlSerializer(typeof(Copse)); | 540 | XmlSerializer xs = new XmlSerializer(typeof(Copse)); |
541 | 541 | ||
542 | using (XmlTextWriter writer = new XmlTextWriter(fileName, System.Text.Encoding.UTF8)) | 542 | using (XmlTextWriter writer = new XmlTextWriter(fileName, Util.UTF8)) |
543 | { | 543 | { |
544 | writer.Formatting = Formatting.Indented; | 544 | writer.Formatting = Formatting.Indented; |
545 | xs.Serialize(writer, obj); | 545 | xs.Serialize(writer, obj); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index cb91677..b5f6721 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -7077,7 +7077,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7077 | try | 7077 | try |
7078 | { | 7078 | { |
7079 | byte[] encData_byte = new byte[str.Length]; | 7079 | byte[] encData_byte = new byte[str.Length]; |
7080 | encData_byte = Encoding.UTF8.GetBytes(str); | 7080 | encData_byte = Util.UTF8.GetBytes(str); |
7081 | string encodedData = Convert.ToBase64String(encData_byte); | 7081 | string encodedData = Convert.ToBase64String(encData_byte); |
7082 | return encodedData; | 7082 | return encodedData; |
7083 | } | 7083 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 59525b6..4cb4b61 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -1491,7 +1491,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1491 | notecardData = "Linden text version 2\n{\nLLEmbeddedItems version 1\n{\ncount 0\n}\nText length " | 1491 | notecardData = "Linden text version 2\n{\nLLEmbeddedItems version 1\n{\ncount 0\n}\nText length " |
1492 | + textLength.ToString() + "\n" + notecardData + "}\n"; | 1492 | + textLength.ToString() + "\n" + notecardData + "}\n"; |
1493 | 1493 | ||
1494 | asset.Data = Encoding.UTF8.GetBytes(notecardData); | 1494 | asset.Data = Util.UTF8.GetBytes(notecardData); |
1495 | World.AssetService.Store(asset); | 1495 | World.AssetService.Store(asset); |
1496 | 1496 | ||
1497 | // Create Task Entry | 1497 | // Create Task Entry |