diff options
author | Justin Clark-Casey (justincc) | 2012-07-11 22:54:22 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-07-11 22:54:22 +0100 |
commit | 916e3bf886ee622e2f18d6eb74f90fee8c630471 (patch) | |
tree | 69f9a6d2a7f7041966400f56f46c198f2cc06158 /OpenSim/Region/OptionalModules/Scripting/Minimodule | |
parent | Fix build break for windows with missing package for IScriptEngine in prebuil... (diff) | |
download | opensim-SC_OLD-916e3bf886ee622e2f18d6eb74f90fee8c630471.zip opensim-SC_OLD-916e3bf886ee622e2f18d6eb74f90fee8c630471.tar.gz opensim-SC_OLD-916e3bf886ee622e2f18d6eb74f90fee8c630471.tar.bz2 opensim-SC_OLD-916e3bf886ee622e2f18d6eb74f90fee8c630471.tar.xz |
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.
Diffstat (limited to 'OpenSim/Region/OptionalModules/Scripting/Minimodule')
-rw-r--r-- | OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs index 74f5208..03481d2 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs | |||
@@ -482,10 +482,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | |||
482 | // Convert to base64 | 482 | // Convert to base64 |
483 | // | 483 | // |
484 | string filetext = Convert.ToBase64String(data); | 484 | string filetext = Convert.ToBase64String(data); |
485 | 485 | Byte[] buf = Encoding.ASCII.GetBytes(filetext); | |
486 | ASCIIEncoding enc = new ASCIIEncoding(); | ||
487 | |||
488 | Byte[] buf = enc.GetBytes(filetext); | ||
489 | 486 | ||
490 | m_log.Info("MRM 9"); | 487 | m_log.Info("MRM 9"); |
491 | 488 | ||