On Saturday 11 May 2013 15:35, Norm Pierce wrote:
> Using v1.21.0 of BusyBox, the telnet applet sends Ctrl-m when I press
> Ctrl-j. Obviously, this creates problems for an application that expects
> to receive Ctrl-j when I press Ctrl-j.
>
> Former versions of BusyBox did not have this problem.
Which version of non-busybox telnet passes ^J verbatim?
> I suspect line 204
> in networking/telnet.c:
>
> if (c == '\r' || c == '\n') {
>
> I'd much appreciate it if you have time to look into this.
[Enter] key and Ctrl-J send the same ACSII code.
Relevant docs:
http://www.ietf.org/rfc/rfc1123.txt
"""
3.3.1 Telnet End-of-Line Convention
The Telnet protocol defines the sequence CR LF to mean "end-
of-line". For terminal input, this corresponds to a command-
completion or "end-of-line" key being pressed on a user
terminal; on an ASCII terminal, this is the CR key, but it may
also be labelled "Return" or "Enter".
When a Server Telnet receives the Telnet end-of-line sequence
CR LF as input from a remote terminal, the effect MUST be the
same as if the user had pressed the "end-of-line" key on a
local terminal. On server hosts that use ASCII, in particular,
receipt of the Telnet sequence CR LF must cause the same effect
as a local user pressing the CR key on a local terminal. Thus,
CR LF and CR NUL MUST have the same effect on an ASCII server
host when received as input over a Telnet connection.
A User Telnet MUST be able to send any of the forms: CR LF, CR
NUL, and LF. A User Telnet on an ASCII host SHOULD have a
user-controllable mode to send either CR LF or CR NUL when the
user presses the "end-of-line" key, and CR LF SHOULD be the
default.
"""
I follow the last paragraph: "CR LF SHOULD be the default"
when user presses the "end-of-line" key.
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox