Add explicit CultureInfo to the script compile thread in DotNetEngine to

ensure that scripts will compile on nonenglish systems
0.6.0-stable
Melanie Thielker 2008-09-28 20:29:56 +00:00
parent 3747862999
commit c2308d8a7d
3 changed files with 11 additions and 0 deletions

View File

@ -63,6 +63,9 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
public EventQueueThreadClass()//EventQueueManager eqm public EventQueueThreadClass()//EventQueueManager eqm
{ {
CultureInfo USCulture = new CultureInfo("en-US");
Thread.CurrentThread.CurrentCulture = USCulture;
//eventQueueManager = eqm; //eventQueueManager = eqm;
ReadConfig(); ReadConfig();
Start(); Start();

View File

@ -27,6 +27,7 @@
using System; using System;
using System.Reflection; using System.Reflection;
using System.Globalization;
using log4net; using log4net;
using OpenMetaverse; using OpenMetaverse;
using OpenSim.Framework; using OpenSim.Framework;
@ -140,6 +141,9 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
ScenePresence presence = ScenePresence presence =
World.GetScenePresence(taskInventoryItem.OwnerID); World.GetScenePresence(taskInventoryItem.OwnerID);
CultureInfo USCulture = new CultureInfo("en-US");
Thread.CurrentThread.CurrentCulture = USCulture;
try try
{ {
// Compile (We assume LSL) // Compile (We assume LSL)

View File

@ -496,6 +496,10 @@ namespace OpenSim.Region.ScriptEngine.XEngine
ScenePresence presence = m_Scene.GetScenePresence(item.OwnerID); ScenePresence presence = m_Scene.GetScenePresence(item.OwnerID);
string assembly = ""; string assembly = "";
CultureInfo USCulture = new CultureInfo("en-US");
Thread.CurrentThread.CurrentCulture = USCulture;
try try
{ {
assembly = m_Compiler.PerformScriptCompile(script, assembly = m_Compiler.PerformScriptCompile(script,