[Mono-bugs] [Bug 33307][Nor] Changed - Error when getting Encoding.Default
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
6 Nov 2002 00:07:23 -0000
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 gonzalo@ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=33307
--- shadow/33307 Tue Nov 5 11:47:51 2002
+++ shadow/33307.tmp.27766 Tue Nov 5 19:07:22 2002
@@ -1,23 +1,23 @@
Bug#: 33307
Product: Mono/Class Libraries
Version: unspecified
-OS:
+OS: unknown
OS Details:
-Status: NEW
-Resolution:
-Severity:
+Status: RESOLVED
+Resolution: FIXED
+Severity: Unknown
Priority: Normal
Component: System
AssignedTo: mono-bugs@ximian.com
ReportedBy: carlosga@telefonica.net
QAContact: mono-bugs@ximian.com
TargetMilestone: ---
URL:
Cc:
-Summary: Error using System.Array.Copy
+Summary: Error when getting Encoding.Default
Hello:
I´m having problems with results of System.Array.Copy ( tested with mono
0.16 under Windows 2000 )
@@ -53,6 +53,25 @@
Console.ReadLine();
Best regards
Carlos Guzmán Álvarez
Vigo-Spain
+
+------- Additional Comments From gonzalo@ximian.com 2002-11-05 19:07 -------
+This was not an Array.Copy bug.
+
+It was a bug that prevented proper Encoding.Default to be obtained and
+unveiled a couple of little bugs in I18N classes.
+
+However, you should not use 'user.Length' in this line:
+
+System.Array.Copy(Encoding.Default.GetBytes(user), 0, user_id, n,
+user.Length);
+
+you should get the size of the byte array the
+Encoding.Default.GetBytes () will return by calling
+Encoding.Default.GetByteCount (user);
+
+Fixed in CVS.
+Thanks!
+