[Mono-bugs] [Bug 63981][Maj] Changed - Sorting of strings difference in .NET and Mono

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 31 Aug 2004 10:41:57 -0400 (EDT)

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 lupus@ximian.com.


--- shadow/63981	2004-08-31 09:50:43.000000000 -0400
+++ shadow/63981.tmp.29167	2004-08-31 10:41:57.000000000 -0400
@@ -1,15 +1,15 @@
 Bug#: 63981
 Product: Mono: Class Libraries
 Version: unspecified
 OS: unknown
 OS Details: 
-Status: RESOLVED   
-Resolution: NOTABUG
+Status: REOPENED   
 Severity: Unknown
-Priority: Minor
+Priority: Major
 Component: System
 AssignedTo: mono-bugs@ximian.com                            
 ReportedBy: maurits.rijk@philips.com               
 QAContact: mono-bugs@ximian.com
 TargetMilestone: ---
@@ -67,6 +67,38 @@
 You need to use the Invariant culture if you want the result of
 sorting strings to be predictable.
 See the documentation for System.String.Compare().  You're seeing the
 default CompareOption in action, which makes punctuation count less
 than letters.  It's called "word sort".
+------- Additional Comments From lupus@ximian.com  2004-08-31 10:41 -------
+See the following test.
+The output on the MS runtime is:
+current culture is: italiano (Italia)
+The output in mono (with LANG=it_IT):
+current culture is: italiano (Italia)
+So we give embarassingly incorrect results. I bet the same happens
+with other cultures, probably Maurits has nl_NL.
+using System;
+using System.Collections;
+using System.Globalization;
+class Class1 {
+	static void Main(string[] args) {
+		ArrayList array = new ArrayList();
+		array.Add("foo.obj");
+		array.Add("foobar.obj");
+		array.Sort();
+		Console.WriteLine ("current culture is: {0}",
+		foreach (string s in array) {
+			Console.WriteLine(s);
+		}
+	}