diff -dur coreutils-5.0.utf/doc/coreutils.texi coreutils-5.0/doc/coreutils.texi --- coreutils-5.0.utf/doc/coreutils.texi 2004-03-20 07:21:25 +0600 +++ coreutils-5.0/doc/coreutils.texi 2004-03-20 07:23:59 +0600 @@ -9583,6 +9583,15 @@ @cindex beeping at input buffer full Enable beeping and not flushing input buffer if a character arrives when the input buffer is full. Non-@acronym{POSIX}. May be negated. + +@item iutf8 +@opindex iutf8 +@cindex UTF-8 input, process accordingly +Behave according to the assumption that the input is in UTF-8, and thus +some characters are represented by several bytes. This imposes more +complexity on the processing of Backspace and Tab in the input. +Non-@acronym{POSIX}. (Works for newer Linux kernels: 2.6.5 and other.) +May be negated. @end table diff -dur coreutils-5.0.utf/src/stty.c coreutils-5.0/src/stty.c --- coreutils-5.0.utf/src/stty.c 2002-12-18 14:53:47 +0600 +++ coreutils-5.0/src/stty.c 2004-03-20 07:30:41 +0600 @@ -39,6 +39,11 @@ #if HAVE_TERMIOS_H # include #endif +/* A hack before I find a better solution to make kernel's IUTF8 def visible */ +/* we don't want two colliding struct termios definitions. */ +#define termios HACK_HIDE_termios +# include +#undef termios #ifdef GWINSZ_IN_SYS_IOCTL # include #endif @@ -238,6 +240,9 @@ #ifdef IMAXBEL {"imaxbel", input, SANE_SET | REV, IMAXBEL, 0}, #endif +#ifdef IUTF8 + {"iutf8", input, REV, IUTF8, 0}, +#endif {"opost", output, SANE_SET | REV, OPOST, 0}, #ifdef OLCUC @@ -591,6 +596,7 @@ "), stdout); fputs (_("\ * [-]iuclc translate uppercase characters to lowercase\n\ + * [-]iutf8 assume input characters are UTF-8 encoded\n\ * [-]ixany let any character restart output, not only start character\n\ [-]ixoff enable sending of start/stop characters\n\ [-]ixon enable XON/XOFF flow control\n\