From c2308d8a7d8a80d04bd7b070cb1b2f9c8b00afa7 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sun, 28 Sep 2008 20:29:56 +0000 Subject: Add explicit CultureInfo to the script compile thread in DotNetEngine to ensure that scripts will compile on nonenglish systems --- OpenSim/Region/ScriptEngine/DotNetEngine/EventQueueThreadClass.cs | 3 +++ OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs | 4 ++++ OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | 4 ++++ 3 files changed, 11 insertions(+) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/EventQueueThreadClass.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/EventQueueThreadClass.cs index 60fdf39..4bd0b45 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/EventQueueThreadClass.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/EventQueueThreadClass.cs @@ -63,6 +63,9 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine public EventQueueThreadClass()//EventQueueManager eqm { + CultureInfo USCulture = new CultureInfo("en-US"); + Thread.CurrentThread.CurrentCulture = USCulture; + //eventQueueManager = eqm; ReadConfig(); Start(); diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs index 7ba1a83..627b2a7 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs @@ -27,6 +27,7 @@ using System; using System.Reflection; +using System.Globalization; using log4net; using OpenMetaverse; using OpenSim.Framework; @@ -140,6 +141,9 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine ScenePresence presence = World.GetScenePresence(taskInventoryItem.OwnerID); + CultureInfo USCulture = new CultureInfo("en-US"); + Thread.CurrentThread.CurrentCulture = USCulture; + try { // Compile (We assume LSL) diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index 6bafd69..1833d5c 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs @@ -496,6 +496,10 @@ namespace OpenSim.Region.ScriptEngine.XEngine ScenePresence presence = m_Scene.GetScenePresence(item.OwnerID); string assembly = ""; + + CultureInfo USCulture = new CultureInfo("en-US"); + Thread.CurrentThread.CurrentCulture = USCulture; + try { assembly = m_Compiler.PerformScriptCompile(script, -- cgit v1.1