mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 09:45:47 +08:00
Where possible, use the system Encoding.ASCII and Encoding.UTF8 rather than constructing fresh copies.
The encodings are thread-safe and already used in such a manner in other places. This isn't done where Byte Order Mark output is suppressed, since Encoding.UTF8 is constructed to output the BOM.
This commit is contained in:
@@ -10536,9 +10536,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
return;
|
||||
}
|
||||
|
||||
System.Text.UTF8Encoding enc =
|
||||
new System.Text.UTF8Encoding();
|
||||
string data = enc.GetString(a.Data);
|
||||
string data = Encoding.UTF8.GetString(a.Data);
|
||||
//m_log.Debug(data);
|
||||
NotecardCache.Cache(id, data);
|
||||
AsyncCommands.
|
||||
@@ -10591,9 +10589,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
return;
|
||||
}
|
||||
|
||||
System.Text.UTF8Encoding enc =
|
||||
new System.Text.UTF8Encoding();
|
||||
string data = enc.GetString(a.Data);
|
||||
string data = Encoding.UTF8.GetString(a.Data);
|
||||
//m_log.Debug(data);
|
||||
NotecardCache.Cache(id, data);
|
||||
AsyncCommands.DataserverPlugin.DataserverReply(id.ToString(),
|
||||
|
||||
@@ -1811,8 +1811,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
if (a == null)
|
||||
return UUID.Zero;
|
||||
|
||||
System.Text.UTF8Encoding enc = new System.Text.UTF8Encoding();
|
||||
string data = enc.GetString(a.Data);
|
||||
string data = Encoding.UTF8.GetString(a.Data);
|
||||
NotecardCache.Cache(assetID, data);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user