1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00

Send the IUTF8 terminal mode in SSH "pty-req"s.

An opcode for this was recently published in
https://tools.ietf.org/html/draft-sgtatham-secsh-iutf8-00 .

The default setting is conditional on frontend_is_utf8(), which is
consistent with the pty back end's policy for setting the same flag
locally. Of course, users can override the setting either way in the
GUI configurer, the same as all other tty modes.
This commit is contained in:
Simon Tatham 2016-05-03 08:43:50 +01:00
parent 2a73676490
commit dcf4466305
3 changed files with 8 additions and 5 deletions

View File

@ -54,11 +54,11 @@ const char *const ttymodes[] = {
"SWTCH", "STATUS", "DISCARD", "IGNPAR", "PARMRK",
"INPCK", "ISTRIP", "INLCR", "IGNCR", "ICRNL",
"IUCLC", "IXON", "IXANY", "IXOFF", "IMAXBEL",
"ISIG", "ICANON", "XCASE", "ECHO", "ECHOE",
"ECHOK", "ECHONL", "NOFLSH", "TOSTOP", "IEXTEN",
"ECHOCTL", "ECHOKE", "PENDIN", "OPOST", "OLCUC",
"ONLCR", "OCRNL", "ONOCR", "ONLRET", "CS7",
"CS8", "PARENB", "PARODD", NULL
"IUTF8", "ISIG", "ICANON", "XCASE", "ECHO",
"ECHOE", "ECHOK", "ECHONL", "NOFLSH", "TOSTOP",
"IEXTEN", "ECHOCTL", "ECHOKE", "PENDIN", "OPOST",
"OLCUC", "ONLCR", "OCRNL", "ONOCR", "ONLRET",
"CS7", "CS8", "PARENB", "PARODD", NULL
};
/*

1
ssh.c
View File

@ -125,6 +125,7 @@ static const struct ssh_ttymode {
{ "IXANY", 39, TTY_OP_BOOL },
{ "IXOFF", 40, TTY_OP_BOOL },
{ "IMAXBEL", 41, TTY_OP_BOOL },
{ "IUTF8", 42, TTY_OP_BOOL },
{ "ISIG", 50, TTY_OP_BOOL },
{ "ICANON", 51, TTY_OP_BOOL },
{ "XCASE", 52, TTY_OP_BOOL },

View File

@ -6374,6 +6374,8 @@ char *term_get_ttymode(Terminal *term, const char *mode)
const char *val = NULL;
if (strcmp(mode, "ERASE") == 0) {
val = term->bksp_is_delete ? "^?" : "^H";
} else if (strcmp(mode, "IUTF8") == 0) {
val = frontend_is_utf8(term->frontend) ? "yes" : "no";
}
/* FIXME: perhaps we should set ONLCR based on lfhascr as well? */
/* FIXME: or ECHO and friends based on local echo state? */