Re: Read-line bug in STk 4.0.1 - missing control-Ms.

From: Erick Gallesio <Erick.Gallesio_at_unice.fr>
Date: Fri, 24 Dec 1999 00:44:38 +0100 (CET)

Harvey J. Stein writes:
>
> I found a bug in read-line under linux/intel. It seems to be dropping
> the control-M character. It looks like a piece of MS DOS/MS Windows
> support made it into the unix side.
>
> To reproduce this:
> 1. Make a file foo whose first line contains a control M, as in:
> Do control-Ms ( ) work right in stk?
> ^
> Make this a control-m.
> 2. Run the following in STk:
>
> (with-input-from-file "foo" read-line)
>
> 3. Note that the return string doesn't contain a control-M.
>
> This is in STk 4.0.1 (installed on RH 6.1 from RPM STk-4.0.1-1).
>

This is not a bug but rather a feature ;-) This is not a DOS problem
(this time ;-)) but something voluntary ...

I have done that to get rid of "\r\n" which appears as soon as you
use networks protocols (HTTP, FTP, ...). All these protocols generally
impose that the server send you lines delimited à la MS-DOS.

At the time I have implemented it, I thought it was a great idea. But
now, I 'm not so sure. Perhaps, we can have an option on read-line
which tell if we want to keep on not the carriage return. Of course
the default value would be to delete carriage return for compatibility
reasons. What do you think of such an approach?


                -- Erick
Received on Fri Dec 24 1999 - 11:42:01 CET

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST