Subject: Re: bug#14403: 24.3.50; [regression] Typing non-ascii characters on a non-GUI MS-Windows session

From: Stefan Monnier <[email-masked]>
Date: Wed, 22 May 2013 12:06:47 -0400

> Of course, we could always augment this condition:

>       if (!((FRAME_TERMCAP_P (frame) || FRAME_MSDOS_P (frame))
> 	    && (TERMINAL_KEYBOARD_CODING (terminal)->common_flags
> 		& CODING_REQUIRE_DECODING_MASK)))
> 	return nextevt;		/* No decoding needed.  */

Before my change, the test was just

          (TERMINAL_KEYBOARD_CODING (terminal)->common_flags
 	   & CODING_REQUIRE_DECODING_MASK)

but was done inside tty_read_avail_input.  AFAICT, tty_read_avail_input
is only used under POSIX ttys and MSDOS, hence this bug: FRAME_TERMCAP_P
is true for w32 non-GUI frames even though they don't use
tty_read_avail_input (they use w32_console_read_socket instead).

So a crude fix would be to check
"terminal->read_socket_hook == &tty_read_avail_input".

What would be a good test to cleanly distinguish posix ttys from w32
"ttys"?

        Stefan