[Mono-bugs] [Bug 38421][Min] New - ASCIIEncoder::GetString(byte[],int,int) throws unwanted exception

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Thu, 20 Feb 2003 16:05:08 -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 jkdoug@psu.edu.


--- shadow/38421	Thu Feb 20 16:05:08 2003
+++ shadow/38421.tmp.19538	Thu Feb 20 16:05:08 2003
@@ -0,0 +1,35 @@
+Bug#: 38421
+Product: Mono/Class Libraries
+Version: unspecified
+OS: Red Hat 7.3
+OS Details: 
+Status: NEW   
+Priority: Minor
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: jkdoug@psu.edu               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+Summary: ASCIIEncoder::GetString(byte[],int,int) throws unwanted exception
+Description of Problem:
+I am reading a stream of bytes as part of a network packet. Microsoft's 
+framework is successful in translating the bytes into a string. The same 
+code under Mono throws an exception. I have compared the SSCLI code for 
+ASCIIEncoding to the Mono code and found a few minor differences in the 
+code. It should be a simple fix, if the problem can be reproduced by a 
+Mono developer.
+Sample code (without variable contents - sorry):
+// In an unsafe context, of course...
+string strDevice = new ASCIIEncoding().GetString(replyData, 
+Console.WriteLine("Access to device: {0}", strDevice);