diff --git a/bin/stty/modes.c b/bin/stty/modes.c --- a/bin/stty/modes.c +++ b/bin/stty/modes.c @@ -128,6 +128,8 @@ { "-decctlq", IXANY, 0 }, { "imaxbel", IMAXBEL, 0 }, { "-imaxbel", 0, IMAXBEL }, + { "iutf8", IUTF8, 0 }, + { "-iutf8", 0, IUTF8 }, { NULL, 0, 0 }, }; diff --git a/bin/stty/print.c b/bin/stty/print.c --- a/bin/stty/print.c +++ b/bin/stty/print.c @@ -129,6 +129,7 @@ put("-inpck", INPCK, 0); put("-ignpar", IGNPAR, 0); put("-parmrk", PARMRK, 0); + put("-iutf8", IUTF8, 1); /* output flags */ tmp = tp->c_oflag; diff --git a/sys/kern/tty.c b/sys/kern/tty.c --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -87,8 +87,8 @@ /* * Flags that are supported and stored by this implementation. */ -#define TTYSUP_IFLAG (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK|ISTRIP|\ - INLCR|IGNCR|ICRNL|IXON|IXOFF|IXANY|IMAXBEL) +#define TTYSUP_IFLAG (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK|ISTRIP|INLCR|\ + IGNCR|ICRNL|IXON|IXOFF|IXANY|IMAXBEL|IUTF8) #define TTYSUP_OFLAG (OPOST|ONLCR|TAB3|ONOEOT|OCRNL|ONOCR|ONLRET) #define TTYSUP_LFLAG (ECHOKE|ECHOE|ECHOK|ECHO|ECHONL|ECHOPRT|\ ECHOCTL|ISIG|ICANON|ALTWERASE|IEXTEN|TOSTOP|\ diff --git a/sys/sys/_termios.h b/sys/sys/_termios.h --- a/sys/sys/_termios.h +++ b/sys/sys/_termios.h @@ -99,6 +99,7 @@ #if __BSD_VISIBLE #define IMAXBEL 0x00002000 /* ring bell on input queue full */ #endif +#define IUTF8 0x00004000 /* input is utf-8 encoded */ /* * Output flags - software output processing