[Opensim-dev] OpenSim threads culture and regional settings (Windows XP)

Laurent B. grumly57 at hotmail.com
Fri Jun 27 07:49:38 UTC 2008


Hello,

I have noticed some issues when running OpenSim on Windows XP which regional settings are set to a different culture than en-US.

Please take a look on http://opensimulator.org/mantis/view.php?id=1611 and http://opensimulator.org/mantis/view.php?id=1382.

I noticed that Framework.Culture.SetCurrentCulture() is called to force the thread culture to en-US when the simulator is being started.

However, it seems that threads which are created during OpenSim execution are using a CultureInfo based on the operating system regional settings. I suppose this happens to the scripts threads. I have included a snapshot in mantis 1611 that shows the current thread culture and the result of a vector ToString() conversion in the Watch box during debug mode in VS2008.

The french culture I am using uses decimal symbol as coma "," instead of point ".". This makes convert, tryparse and tostring() methods to fail or send erroneous results. For example, Vector parsing operation and some deserialization operations. For example, llSetPrimitiveParams([PRIM_SIZE], <10,10,10>]); gives a flat prim that correspond to a <10,0,10> scale 

I have tried to hack the ThreadTracker to force the threads culture to en-US in Add() method, and everything is ok. I dont think this would be a recommended solution because ThreadTracker has not been design for this purpose. For now I switched the regional settings of Windows to en-US.

Because I think OpenSim aims to be culture independant, I think the best is to force the en-US culture at some "root" level for threads too. Another solution consists in passing the right cultureinfo to every culture-sentive methods. I have seen that 1382 is assigned to Adam. I dont know what is the best to do and I welcome recommendations.

Oh, by the way, I have no clue whether it happens with Linux and MacOSX operating system.

Cheers,
Laurent.
Forest Klaar (SL)
Grumly TheBear (Francogrid and others...)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://opensimulator.org/pipermail/opensim-dev/attachments/20080627/c1370947/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Emoticon1.gif
Type: image/gif
Size: 257 bytes
Desc: not available
URL: <http://opensimulator.org/pipermail/opensim-dev/attachments/20080627/c1370947/attachment-0001.gif>


More information about the Opensim-dev mailing list