[Mono-bugs] [Bug 76926][Cri] New - ASCIIEncoding.GetString implementations are broken

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Mon Dec 5 19:44:50 EST 2005


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 grant at janrain.com.

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

--- shadow/76926	2005-12-05 19:44:50.000000000 -0500
+++ shadow/76926.tmp.32587	2005-12-05 19:44:50.000000000 -0500
@@ -0,0 +1,42 @@
+Bug#: 76926
+Product: Mono: Class Libraries
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 001 One hour
+Priority: Critical
+Component: CORLIB
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: grant at janrain.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Summary: ASCIIEncoding.GetString implementations are broken
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+ASCIIEncoding.GetString implementations fail to actually use the
+ASCIIEncoding.GetChars code. They simply call the String constructor with
+the bytes passed in. Whether this is a problem with the String constructor
+or GetString, the behavior of GetString is inconsistent with MS.
+
+
+Steps to reproduce the problem:
+byte[] data = {0xFF};
+bool result = Encoding.ASCII.GetString(data) == "?";
+
+Actual Results:
+result == false;
+
+Expected Results:
+result == true;
+
+How often does this happen? 
+Always
+
+Additional Information:
+It looks like you could just remove the overridden methods from
+ASCIIEncoding because Encoding does the correct thing.


More information about the mono-bugs mailing list