bugDotGNU Portable.NET - Bugs: bug #7014, String.Compare() returns the wrong...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #7014: String.Compare() returns the wrong values when comparing n and N

Submitted by:  -Deleted Account- <scandium>
Submitted on:  Mon 29 Dec 2003 05:00:40 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Mon 22 Nov 2004 02:22:46 PM UTC, comment #2:

fixed in cvs 11/22/2004

Klaus Treichel <ktreichel>
Project Administrator
Sun 21 Nov 2004 02:26:35 PM UTC, comment #1:

Added a patch to fix this Bug (and the same one in String.Compare(Sring, String)).

Klaus Treichel <ktreichel>
Project Administrator
Mon 29 Dec 2003 05:00:40 PM UTC, original submission:

When running the attached test case pnet returns
-1
0
0
-1
but MS .NET returns (as expected)
1
0
0
1

It seems like if pnet compares the same characters but one is capitalized and one isn't, it returns the wrong value.
e.g. if I am not mistaken in .NET it's supposed to be
c > a
C > a
N > n

pnet seems to interpret the last one the other way around (n > N)

-Deleted Account- <scandium>

 

Attached Files
file #2038:  kt-041121.patch added by ktreichel (8KiB - text/x-patch - Throw the previous one in the bin. This one is more complete (Missed _IL_String_Compare).)
file #2037:  kt-041121.patch added by ktreichel (7KiB - text/x-patch - patch that fixes this bug)
file #934:  compare.cs added by scandium (458B - application/octet-stream - String.Compare() test case)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 5 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Tue 14 Dec 2004 07:36:13 AM UTCktreichelOpen/ClosedOpen=>Closed
Mon 22 Nov 2004 02:22:46 PM UTCktreichelStatusNone=>Fixed
Sun 21 Nov 2004 02:26:35 PM UTCktreichelAttached File-=>Added kt-041121.patch, #1900
Sun 21 Nov 2004 10:15:40 AM UTCktreichelAttached File-=>Added kt-041121.patch, #1899
Mon 29 Dec 2003 05:00:40 PM UTCscandiumAttached File-=>Added compare.cs, #914

Back to the top


Powered by Savane 3.1-cleanup1