[Mono-bugs] [Bug 56985][Wis] Changed - Error in String.Replace()

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Thu, 15 Apr 2004 12:17:04 -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 dick@ximian.com.

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

--- shadow/56985	2004-04-14 08:46:25.000000000 -0400
+++ shadow/56985.tmp.27576	2004-04-15 12:17:04.000000000 -0400
@@ -1,13 +1,13 @@
 Bug#: 56985
 Product: Mono: Class Libraries
 Version: unspecified
 OS: unknown
 OS Details: 
-Status: NEW   
-Resolution: 
+Status: RESOLVED   
+Resolution: NOTABUG
 Severity: Unknown
 Priority: Wishlist
 Component: CORLIB
 AssignedTo: dick@ximian.com                            
 ReportedBy: mono-bug@jerryweb.info               
 QAContact: mono-bugs@ximian.com
@@ -63,6 +63,22 @@
 Grrrrrrrr. Third attempt :-/
 
 ...
 Actual Results in Mono (CVS, 2004-04-12), Gentoo Linux
 etc...
 
+
+------- Additional Comments From dick@ximian.com  2004-04-15 12:17 -------
+In unicode locales, chars 32 (0x20) and 160 (0xA0) are SPACE and
+NO-BREAK SPACE.  Mono correctly treats those characters as identical
+in culture-sensitive comparisons (which doesn't include String.Equals()).
+
+If you run the test app in a non-unicode locale (eg set LANG=C) you
+will see:
+
+:; LANG=C mono 56985.exe
+(int) s1[0] = 32
+(int) s2[0] = 160
+s1.Replace(s2, "abc"):  ;
+s2.Replace(s1, "def"):  ;
+s1.Equals(s2): False
+