[Mono-bugs] [Bug 52099][Nor] New - Thread.CurrentThread.CurrentCulture default value is wrong
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Fri, 12 Dec 2003 08:51:30 -0500 (EST)
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by bruno@clisp.org.
http://bugzilla.ximian.com/show_bug.cgi?id=52099
--- shadow/52099 2003-12-12 08:51:30.000000000 -0500
+++ shadow/52099.tmp.29006 2003-12-12 08:51:30.000000000 -0500
@@ -0,0 +1,76 @@
+Bug#: 52099
+Product: Mono/Class Libraries
+Version: unspecified
+OS: SUSE 9.0
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: System
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: bruno@clisp.org
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Thread.CurrentThread.CurrentCulture default value is wrong
+
+Description of Problem:
+
+The default CultureInfo is not initialized according to the environment
+variables LANG, LC_*, LC_ALL, as it should on a POSIX system.
+
+Steps to reproduce the problem:
+$ export LANG=de_DE.UTF-8
+$ export LC_COLLATE=POSIX
+$ env | grep '^\(LANG\|LC_\)'
+LC_COLLATE=POSIX
+LANG=de_DE.UTF-8
+$ cat > <<\EOF
+using System;
+class Hello {
+ static void Main() {
+
+Console.WriteLine(System.Threading.Thread.CurrentThread.CurrentCulture);
+
+Console.WriteLine(System.Threading.Thread.CurrentThread.CurrentUICulture);
+ Console.WriteLine(new System.Globalization.CultureInfo(""));
+ }
+}
+EOF
+$ mcs hello.cs -o hello.mono.exe
+$ mint hello.mono.exe
+$ mono hello.mono.exe
+
+Actual Results:
+$ mint hello.mono.exe
+iv
+iv
+iv
+$ mono hello.mono.exe
+iv
+iv
+iv
+
+
+Expected Results:
+$ mint hello.mono.exe
+de-DE
+de-DE
+
+$ mono hello.mono.exe
+de-DE
+de-DE
+
+Windows results:
+de-DE
+en-US
+
+
+How often does this happen?
+Reproducible.
+
+Additional Information:
+The way locales are set on POSIX systems is described in
+http://www.opengroup.org/onlinepubs/007904975/basedefs/xbd_chap07.html