Preserve IUTF8 as set up by the kernel, which knows which consoles are
in utf8 mode.
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Werner Fink <werner@suse.de>
/* Flush input and output queues, important for modems! */
tcflush(STDIN_FILENO, TCIOFLUSH);
- tp->c_iflag = tp->c_lflag = tp->c_oflag = 0;
+#ifdef IUTF8
+ tp->c_iflag = tp->c_iflag & IUTF8;
+ op->flags |= F_UTF8;
+#else
+ tp->c_iflag = 0;
+#endif
+ tp->c_lflag = tp->c_oflag = 0;
if ((op->flags & F_KEEPCFLAGS) == 0)
tp->c_cflag = CS8 | HUPCL | CREAD | (tp->c_cflag & CLOCAL);