Re: telnet CR processing, bridge comm servers and TWG telnet

Barry Margolin (
10 Aug 87 21:35:19 GMT

In article <In article <109@quick.UUCP> In article <109@quick.UUCP> srg@quick.UUCP (Spencer Garrett) writes:
> You hit <RETURN>
> The Bridge box sends \r\n

You said this twice in your message without justifying it. The key is
labeled RETURN, which is generally taken to be a synonym for CR. The
TELNET spec says that CR should be represented in NETASCII as CRNUL.
Why should the Bridge box assume that CR is NEWLINE?

> telnetd converts \r\n to \n and feeds it to the pty
> telnet reads \n from its tty (pseudo-tty, but it shouldn't matter)
> telnet sends \r\n through its tcp stream to the vax
> the vax should convert \r\n to whatever it wants for EOL

What if the program on the VAX wants to see the raw characters that
the user typed, which happens in programs such as EMACS? This means
that if the user types CR it will get translated into the VAX's EOL
sequence, and the program may not see the CR that the user typed.
Your scenario only works if the remote system is in line-at-a-time

The reason for all the confusion that the TELNET spec has caused is
that NETASCII is used for more than terminal emulation. It is used in
FTP, for example, to support the control connection and text-mode file
transfers. In these cases, things like End-of-Line have much more
obvious meaning, or at least the need for a standard representation is
obvious (some systems use a character sequence to indicate newline,
others use a record structure). In terminal emulation, whether the
RETURN key indicates End-of-Line is totally context dependent. In
EMACS I can map any key to any operation, and I don't want the network
to transform my keyboard for me.

Barry Margolin
Thinking Machines Corp. seismo!think!barmar

This archive was generated by hypermail 2.0b3 on Thu Mar 09 2000 - 14:38:49 GMT