[Mono-bugs] [Bug 53730][Maj] New - String.Replace incorrectly does a case-insensitive compare

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sun, 1 Feb 2004 23:57:07 -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 mathpup@mylinuxisp.com.

http://bugzilla.ximian.com/show_bug.cgi?id=53730

--- shadow/53730	2004-02-01 23:57:07.000000000 -0500
+++ shadow/53730.tmp.14997	2004-02-01 23:57:07.000000000 -0500
@@ -0,0 +1,65 @@
+Bug#: 53730
+Product: Mono/Class Libraries
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: mathpup@mylinuxisp.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: String.Replace incorrectly does a case-insensitive compare
+
+Description of Problem: 
+ 
+When calling String.Replace on a string, the comparison seems to be done 
+on a case-insensitive basis. For example, in the test program: 
+ 
+using System; 
+ 
+public class Testing 
+{ 
+    private static void Main() 
+    { 
+        string str = "Piggy"; 
+        Console.WriteLine( str.Replace( "I", "" ) ); 
+    } 
+} 
+ 
+ 
+ 
+ 
+ 
+Steps to reproduce the problem: 
+1. mcs piggy.cs 
+2. mono piggy.exe 
+ 
+ 
+ 
+Actual Results: 
+ 
+Prints "Pggy" 
+ 
+ 
+Expected Results: 
+ 
+Prints "Piggy" 
+ 
+ 
+How often does this happen?  
+ 
+Always 
+ 
+ 
+Additional Information: 
+ 
+jba and danmorg verified that "Piggy" is printed on .NET as on Rotor. The 
+null-string does not seem to be the culprit itself, since str.Replace("G", 
+"t") will turn Piggy into Pitty on mono. This was *not* present in the 
+0.29 release, as far as I can tell.