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 [EMAIL PROTECTED] http://bugzilla.ximian.com/show_bug.cgi?id=80459 --- shadow/80459 2007-01-05 13:44:11.000000000 -0500 +++ shadow/80459.tmp.27555 2007-01-05 17:01:13.000000000 -0500 @@ -1,13 +1,13 @@ Bug#: 80459 Product: Mono: Runtime Version: 1.2 OS: GNU/Linux [Other] OS Details: -Status: REOPENED -Resolution: +Status: RESOLVED +Resolution: NOTABUG Severity: Unknown Priority: Major Component: misc AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] QAContact: [EMAIL PROTECTED] @@ -79,6 +79,21 @@ ------- Additional Comments From [EMAIL PROTECTED] 2007-01-05 13:44 ------- I attached smaller testclient and it isn't a newline issue, because it also happens with strings without newlines. I also tried changing the encodings to UTF8 and it also resulted same problems (on Linux). + +------- Additional Comments From [EMAIL PROTECTED] 2007-01-05 17:01 ------- +In testserver.cs rxbuf has the length 1024. After receiving +from the socket its length it's still 1024 because arrays +don't shrink in .NET. + +If you call Encoding.GetString on this byte array, it +will return garbage, because only the fist few bytes contain +the string. + +You have to use another GetString overload that considers +the length of the buffer: + +string test1 = Encoding.ASCII.GetString(rxbuf, 0, rxbuflen); + _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
