Telnet CRLF's

Geof Cooper (imagen!
Fri, 7 Aug 87 15:23:48 pdt

The problem is REALLY:

    How do I get RETURN to work properly both at the
    command level and in EMACS (or other RAW mode
    application, like vi, tip, etc....).

At the command level (in "cooked tty" applications), the
"big key" on the terminal (which is usually RETURN these
days) is the one you want to type to end a command. Unix
helps tty's to do this by internally mapping the '\r'
character into '\n' (newline == linefeed) in the default
terminal mode.

When you go into a raw-mode application, it usually turns
off this translation. Thus, it must "know" what key is
the "big one" and let you use it. Emacs wants to see a
'\r' to generate its "newline" function.

So on Unix itself, it would be better to use CR-NUL and
never generate newline, since the system will map CR-NUL
into the local newline convention.

BUT, in the generic case, you MIGHT be talking (perhaps
from a Unix machine) to a machine that isn't Unix, and
needs the CR-LF newline sequence. Or you might want
the "big key" to generate the <<right thing>> without
having to worry about it. So you DO want to generate
newline in your telnet user program.

The only resolution of this, in my mind, is for telnet
user programs to always provide an OPTION for what mapping
to use. After all, how does the telnet program know
what the "big key" is, anyway!

- Geof Cooper

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