Hello, Currently, agetty always clears the IUTF8 flag. This poses problem on linux utf8 consoles when for instance running cat (in canonical mode), type a non-ascii character, type backspace, then enter, and finally control-D: the kernel only dropped one of the bytes coding the non-ascii character. The IUTF8 flag should thus be set at some point. It happens that the kernel already sets up the IUTF8 flag correctly. agetty simply has to preserve it, as the patch below implements. Samuel agetty: Fix IUTF8 flag Preserve IUTF8 as set up by the kernel, which knows which consoles are in utf8 mode. Signed-off-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx> diff --git a/term-utils/agetty.c b/term-utils/agetty.c index 6120a26..21c056e 100644 --- a/term-utils/agetty.c +++ b/term-utils/agetty.c @@ -977,7 +977,8 @@ static void termio_init(struct options *op, struct termios *tp) /* Flush input and output queues, important for modems! */ tcflush(STDIN_FILENO, TCIOFLUSH); - tp->c_iflag = tp->c_lflag = tp->c_oflag = 0; + tp->c_iflag = tp->c_iflag & IUTF8; + tp->c_lflag = tp->c_oflag = 0; if ((op->flags & F_KEEPCFLAGS) == 0) tp->c_cflag = CS8 | HUPCL | CREAD | (tp->c_cflag & CLOCAL); -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html