[Mono-bugs] [Bug 81159][Nor] Changed - Console.In.Read doesn't allow line-oriented input with mscorlib 2.0

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed Apr 18 16:02:03 EDT 2007


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 fejj at novell.com.

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

--- shadow/81159	2007-04-18 13:58:39.000000000 -0400
+++ shadow/81159.tmp.28354	2007-04-18 16:02:03.000000000 -0400
@@ -128,6 +128,26 @@
 that I has only one character on Linux and 2 on Windows).
 
 I also noticed that on Mono 2.0 profile the backspace is also 
 counted as a character while this works fine on the 1.0 profile. But 
 I'll probably submit a separate bug report for that once this one's 
 fixed.
+
+------- Additional Comments From fejj at novell.com  2007-04-18 16:02 -------
+Aha, somehow I missed that the 1.1 profile also has this problem. I've
+only been poking at the 2.0 profile.
+
+> With your patch, only the first 16 characters are echoed back during 
+> the first read (while they are all echoed on MS).
+
+I suspected as much... I think I can fix this though.
+
+> Note: pressing enter on Windows (atleast on MS) causes CR+LF (13 10) 
+> to be written to the console, so checking for \n will not work.
+
+why not? This code path does not get used on Windows afaik (it uses
+the WindowsConsoleDriver.cs code instead). Even if it were used on
+Windows, I'm not sure how it would be a problem... a \n always comes
+bundled with a \r preceeding it... and if it doesn't, then it means
+the user pasted a unix-formatted text blurb - in which case I'd argue
+it should Just Work(tm). No?
+


More information about the mono-bugs mailing list