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

Submitter:  -Deleted Account- <scandium>
Submitted:  Mon 29 Dec 2003 05:00:40 PM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Fixed Privacy:  Public
Assigned to:  None Open/Closed:  Closed

Discussion

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

fixed in cvs 11/22/2004

Klaus Treichel <ktreichel>
Group 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>
Group 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

Attached Files
file #2038:  kt-041121.patch added by ktreichel (8.2KiB - 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 (7.3KiB - text/x-patch - patch that fixes this bug)
file #934:  compare.cs added by scandium (458B - application/octet-stream - String.Compare() test case)

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

 

Votes

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

 

History

Follow 5 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2004-12-14 ktreichel Open/ClosedOpen Closed
2004-11-22 ktreichel StatusNone Fixed
2004-11-21 ktreichel Attached File- Added kt-041121.patch, #1900
2004-11-21 ktreichel Attached File- Added kt-041121.patch, #1899
2003-12-29 scandium Attached File- Added compare.cs, #914

Back to the top

Powered by Savane 3.16-1eaf.
Corresponding source code