[Ecls-list] String printing error?

Julian Stecklina der_julian at web.de
Fri Feb 4 08:13:44 UTC 2005


On Fri, 04 Feb 2005 16:56:59 +0100
Juan Jose Garcia Ripoll <lisp at arrakis.es> wrote:

> Julian Stecklina wrote:
> 
> > <>On Fri, 04 Feb 2005 16:40:00 +0100
> > Juan Jose Garcia Ripoll <lisp at arrakis.es> wrote:
> >
> >> > (setf *A* '(#\a #\b #\c #\Return #\d #\e))
> >>(#\a #\b #\c #\Return #\d #\e)
> >> > (coerce *A* 'string)
> >>de"c
> >>
> >Confusing...
> >
> Well, characters are sent in raw format to the output stream. Nothing
> is  done to escape the character #\Return. Hence, your terminal first
> prints  #\", #\a, #\b, #\c and then returns to the beginning of the
> line because  of the #\Return, and continues printing: #\d, #\e, #\".
> 
> What I wonder is why you got the #\Return in the first place. Maybe
> you  are connecting to a Mac?

No. I found the relevant part in RFC 854 (Telnet)

      However, many systems and
      terminals do not treat CR and LF independently, and will have to
      go to some effort to simulate their effect.  (For example, some
      terminals do not have a CR independent of the LF, but on such
      terminals it may be possible to simulate a CR by backspacing.)
      Therefore, the sequence "CR LF" must be treated as a single "new
      line" character and used whenever their combined action is
      intended;
      [...]

Nice to know that there is RFC for everything. :)

Regards,
-- 
                    ____________________________
 Julian Stecklina  /  _________________________/
  ________________/  /
  \_________________/  LISP - truly beautiful




More information about the ecl-devel mailing list