]> sourceware.org Git - newlib-cygwin.git/commit
Cygwin: Add IUTF8 termios iflag
authorCorinna Vinschen <corinna@vinschen.de>
Tue, 31 Jan 2017 14:36:24 +0000 (15:36 +0100)
committerCorinna Vinschen <corinna@vinschen.de>
Tue, 31 Jan 2017 14:36:24 +0000 (15:36 +0100)
commit095cac4b8df4a6d8e5cce37e8fef227aab43bf82
tree2b83d4d078bc925a3fd3f914e00cc6a8b9f92fc9
parentcd5e7e2d8271d8d4b976eaa42c69770d94c67a74
Cygwin: Add IUTF8 termios iflag

The termios code doesn't handle erasing of multibyte characters
in canonical mode, it always erases a single byte.  When entering
a multibyte character and then pressing VERASE, the input ends up
with an invalid character.

Following Linux we introduce the IUTF8 input flag now, set by
default.  When this flag is set, VERASE or VWERASE will check
if the just erased input byte is a UTF-8 continuation byte.  If
so, it erases another byte and checks again until the entire
UTF-8 character has been removed from the input buffer.

Note that this (just as on Linux) does NOT work with arbitrary
multibyte codesets.  This only works with UTF-8.

For a discussion what happens, see
https://cygwin.com/ml/cygwin/2017-01/msg00299.html

Sidenote: The eat_readahead function is now member of fhandler_termios,
not fhandler_base.  That's necessary to get access to the terminal's
termios flags.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
winsup/cygwin/fhandler.cc
winsup/cygwin/fhandler.h
winsup/cygwin/fhandler_termios.cc
winsup/cygwin/include/sys/termios.h
This page took 0.033508 seconds and 5 git commands to generate.