From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#14403: 24.3.50; [regression] Typing non-ascii characters on a non-GUI MS-Windows session Date: Wed, 15 May 2013 11:13:03 +0300 Message-ID: <83sj1o64q8.fsf@gnu.org> References: <87ppwt2x7p.fsf@gmail.com> <83hai5736q.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1368605653 5304 80.91.229.3 (15 May 2013 08:14:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 15 May 2013 08:14:13 +0000 (UTC) Cc: 14403@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed May 15 10:14:11 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UcWqg-0001m2-96 for geb-bug-gnu-emacs@m.gmane.org; Wed, 15 May 2013 10:14:10 +0200 Original-Received: from localhost ([::1]:42894 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UcWqf-0001no-Pg for geb-bug-gnu-emacs@m.gmane.org; Wed, 15 May 2013 04:14:09 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:50106) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UcWqZ-0001nS-Ga for bug-gnu-emacs@gnu.org; Wed, 15 May 2013 04:14:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UcWqV-0002Dj-6l for bug-gnu-emacs@gnu.org; Wed, 15 May 2013 04:14:03 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56865) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UcWqV-0002DY-37 for bug-gnu-emacs@gnu.org; Wed, 15 May 2013 04:13:59 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UcWqX-000700-M2 for bug-gnu-emacs@gnu.org; Wed, 15 May 2013 04:14:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 15 May 2013 08:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14403 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 14403-submit@debbugs.gnu.org id=B14403.136860560526833 (code B ref 14403); Wed, 15 May 2013 08:14:01 +0000 Original-Received: (at 14403) by debbugs.gnu.org; 15 May 2013 08:13:25 +0000 Original-Received: from localhost ([127.0.0.1]:45222 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UcWpv-0006yi-KK for submit@debbugs.gnu.org; Wed, 15 May 2013 04:13:24 -0400 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:37585) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UcWpr-0006yR-Vk for 14403@debbugs.gnu.org; Wed, 15 May 2013 04:13:22 -0400 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0MMT00K00YK8PE00@a-mtaout21.012.net.il> for 14403@debbugs.gnu.org; Wed, 15 May 2013 11:13:08 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MMT00K6TYTVRW30@a-mtaout21.012.net.il>; Wed, 15 May 2013 11:13:08 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:74292 Archived-At: > From: Stefan Monnier > Cc: dmoncayo@gmail.com, 14403@debbugs.gnu.org > Date: Tue, 14 May 2013 18:28:35 -0400 > > > This is an exact duplicate of 14368, discussed just yesterday. > > Hmm, this looks different, since it doesn't seem to use quail Different, yes. But caused by the same change in keyboard.c. > Is it the case that the non-GUI code in Windows receives decoded > chars in `read_char', contrary to the posix code which receives > encoded chars there? Both GUI and non-GUI keyboard input on Windows produce Unicode codepoints of the characters the user types. The produced input events have the 'kind' of either ASCII_KEYSTROKE_EVENT or MULTIBYTE_CHAR_KEYSTROKE_EVENT. They are returned via this call sequence: read_char -> kbd_buffer_get_event -> make_lispy_event I guess the solution is to tell read_decoded_char more about the event that produced the character? Or maybe we should not set the keyboard encoding to the console codepage on Windows (although I have no idea what kind of breakage this could cause)? What setting of keyboard-coding-system tells the condition below that no decoding is needed? 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. */ to do something special for MS-Windows, but that sounds kludgey.