From unknown Thu Jun 19 16:24:17 2025 X-Loop: help-debbugs@gnu.org Subject: bug#8522: Arrow key trouble when keyboard encoding is euc-japan Resent-From: IIJIMA Hiromitsu Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 19 Apr 2011 16:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 8522 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 8522@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Reply-To: bug-gnu-emacs@gnu.org, IIJIMA Hiromitsu Received: via spool by submit@debbugs.gnu.org id=B.130323035126992 (code B ref -1); Tue, 19 Apr 2011 16:26:02 +0000 Received: (at submit) by debbugs.gnu.org; 19 Apr 2011 16:25:51 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QCDkM-00071G-3P for submit@debbugs.gnu.org; Tue, 19 Apr 2011 12:25:51 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QCCTG-0005CZ-Bs for submit@debbugs.gnu.org; Tue, 19 Apr 2011 11:04:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QCCTA-000628-5p for submit@debbugs.gnu.org; Tue, 19 Apr 2011 11:04:01 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:34823) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QCCTA-000624-3H for submit@debbugs.gnu.org; Tue, 19 Apr 2011 11:04:00 -0400 Received: from eggs.gnu.org ([140.186.70.92]:33090) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QCCT9-0004wo-2E for bug-gnu-emacs@gnu.org; Tue, 19 Apr 2011 11:04:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QCCT3-00061a-F1 for bug-gnu-emacs@gnu.org; Tue, 19 Apr 2011 11:03:58 -0400 Received: from mta101.odn.ne.jp ([143.90.14.133]:34490 helo=cmta101.odn.ne.jp) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QCCT2-00061G-RZ for bug-gnu-emacs@gnu.org; Tue, 19 Apr 2011 11:03:53 -0400 Received: from vmta101.odn.ne.jp by cmta101.odn.ne.jp with ESMTP id <20110419150347156.SXSW.963.cmta101.odn.ne.jp@mta101.odn.ne.jp> for ; Wed, 20 Apr 2011 00:03:47 +0900 Received: from emta101.odn.ne.jp by vmta101.odn.ne.jp with ESMTP id <20110419150347113.RADO.27255.vmta101.odn.ne.jp@mta101.odn.ne.jp> for ; Wed, 20 Apr 2011 00:03:47 +0900 Received: from [192.168.1.3] ([143.90.170.109] [143.90.170.109]) by emta101.odn.ne.jp with ESMTP id <20110419150347060.NWOP.28521.emta101.odn.ne.jp@mta101.odn.ne.jp> for ; Wed, 20 Apr 2011 00:03:47 +0900 Message-ID: <4DADA451.7080809@dennougedougakkai-ndd.org> Date: Wed, 20 Apr 2011 00:03:45 +0900 From: IIJIMA Hiromitsu Organization: DENNOU GEDOU GAKKAI, N.D.D. User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ja; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -6.6 (------) X-Mailman-Approved-At: Tue, 19 Apr 2011 12:25:48 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.6 (------) Dear all, I am using Emacs 23.2.1 on FreeBSD and RedHat (32-bit versions). I have configured keyboard-encoding-system be "euc-japan" because it is the terminal's default. But when I upgraded Emacs to ver. 23, arrow keys began to cause troubles when I run Emacs inside a terminal window (emacs -nw). When I move cursor with an arrow key, the cursor movement is reflected to the screen with one stroke delay. C-l shows the cursor's "real" position. It does not happen when I move cursor by C-f, C-n, etc. HOW-TO-REPEAT: Open a file and type C-x RET k euc-japan RET. According to the following site (in Japanese), http://slashdot.jp/~doda/journal/516198 the cause of this trouble is that arrow keys are passed to Emacs as ESC O {A,B,C,D} sequence and this "ESC O" is interpreted as ISO/IEC 2022's SS3 (single-shift 3) code. This trouble occurs when the following conditions are all met: - ISO/IEC 2022 compliant or their variants - Using SS3 - A character set designated to G3 by default At this moment, only Japanese EUC and its variants match the conditions. There are some encodings that use single-shifts: iso-2022-jp-2, iso-2022-cn, and iso-2022-cn-ext. But - iso-2022-jp-2 and iso-2022-cn use SS2 and do not use SS3, and - iso-2022-cn-ext uses SS3 but in this encoding G3 is empty at the boot time. In addition, iso-2022-cn-ext is a 7-bit encoding and therefore you can assume that in a 8-bit encoding, namely only Japanese EUC and its variants, a SS3 is followed by GR byte sequence, and treat the sequence "SS3 + GL-byte" as a void character. The site above published the following patch. Would you consider applying it? Thanks in advance. --- src/coding.c.orig 2010-04-04 07:26:13.000000000 +0900 +++ src/coding.c 2010-09-24 16:42:33.000000000 +0900 @@ -3853,8 +3853,14 @@ else charset = CHARSET_FROM_ID (charset_id_2); ONE_MORE_BYTE (c1); - if (c1 < 0x20 || (c1 >= 0x80 && c1 < 0xA0)) - goto invalid_code; + if (CODING_ISO_FLAGS (coding) & CODING_ISO_FLAG_SEVEN_BITS) { + if (c1 < 0x20 || c1 >= 0x80) + goto invalid_code; + } + else { + if (c1 < 0xA0) + goto invalid_code; + } break; case 'O': /* invocation of single-shift-3 */ @@ -3867,8 +3873,14 @@ else charset = CHARSET_FROM_ID (charset_id_3); ONE_MORE_BYTE (c1); - if (c1 < 0x20 || (c1 >= 0x80 && c1 < 0xA0)) - goto invalid_code; + if (CODING_ISO_FLAGS (coding) & CODING_ISO_FLAG_SEVEN_BITS) { + if (c1 < 0x20 || c1 >= 0x80) + goto invalid_code; + } + else { + if (c1 < 0xA0) + goto invalid_code; + } break; case '0': case '2': case '3': case '4': /* start composition */ -- ======================================================================== 飯嶋 浩光 / でるもんた・いいじま delmonta@dennougedougakkai-ndd.org (Mr.) IIJIMA, Hiromitsu http://www.dennougedougakkai-ndd.org/~delmonta/ From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 21 20:22:52 2012 Received: (at control) by debbugs.gnu.org; 22 Feb 2012 01:22:52 +0000 Received: from localhost ([127.0.0.1]:49551 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S00ux-00042P-OI for submit@debbugs.gnu.org; Tue, 21 Feb 2012 20:22:52 -0500 Received: from fencepost.gnu.org ([140.186.70.10]:54784 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S00uv-00042H-Iv for control@debbugs.gnu.org; Tue, 21 Feb 2012 20:22:50 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1S00sg-0005Hy-1o for control@debbugs.gnu.org; Tue, 21 Feb 2012 20:20:30 -0500 Date: Tue, 21 Feb 2012 20:20:30 -0500 Message-Id: Subject: control message for bug 8522 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) submitter 8522 IIJIMA Hiromitsu From unknown Thu Jun 19 16:24:17 2025 X-Loop: help-debbugs@gnu.org Subject: bug#8522: Arrow key trouble when keyboard encoding is euc-japan Resent-From: Glenn Morris Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 16 Jul 2013 19:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8522 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Kenichi Handa Cc: 8522@debbugs.gnu.org, IIJIMA Hiromitsu Received: via spool by 8522-submit@debbugs.gnu.org id=B8522.137400171511372 (code B ref 8522); Tue, 16 Jul 2013 19:09:02 +0000 Received: (at 8522) by debbugs.gnu.org; 16 Jul 2013 19:08:35 +0000 Received: from localhost ([127.0.0.1]:58968 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UzAby-0002xL-Uv for submit@debbugs.gnu.org; Tue, 16 Jul 2013 15:08:35 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:58199 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UzAbx-0002xD-7E for 8522@debbugs.gnu.org; Tue, 16 Jul 2013 15:08:34 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1UzAbv-0002SC-TY; Tue, 16 Jul 2013 15:08:31 -0400 From: Glenn Morris References: <4DADA451.7080809@dennougedougakkai-ndd.org> X-Spook: plutonium Semtex Abbas Taiwan computer terrorism NASA X-Ran: vDde>#mrS$Cbm7is=6eU|$VgiUMKiOo5\/GG=/B|c:jMG)@Eg@8R3IXaxM`:w@`69W>(l' X-Hue: white X-Attribution: GM Date: Tue, 16 Jul 2013 15:08:31 -0400 In-Reply-To: <4DADA451.7080809@dennougedougakkai-ndd.org> (IIJIMA Hiromitsu's message of "Wed, 20 Apr 2011 00:03:45 +0900") Message-ID: <70ppui8gr4.fsf@fencepost.gnu.org> User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -5.4 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.4 (-----) Please could you take a look at this report? http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8522 IIJIMA Hiromitsu wrote: > I am using Emacs 23.2.1 on FreeBSD and RedHat (32-bit versions). > > I have configured keyboard-encoding-system be "euc-japan" because > it is the terminal's default. > > But when I upgraded Emacs to ver. 23, arrow keys began to cause > troubles when I run Emacs inside a terminal window (emacs -nw). > > When I move cursor with an arrow key, the cursor movement is > reflected to the screen with one stroke delay. > C-l shows the cursor's "real" position. > It does not happen when I move cursor by C-f, C-n, etc. > > HOW-TO-REPEAT: Open a file and type C-x RET k euc-japan RET. > > According to the following site (in Japanese), > http://slashdot.jp/~doda/journal/516198 > the cause of this trouble is that arrow keys are passed to Emacs as > ESC O {A,B,C,D} sequence and this "ESC O" is interpreted as ISO/IEC > 2022's SS3 (single-shift 3) code. > > This trouble occurs when the following conditions are all met: > - ISO/IEC 2022 compliant or their variants > - Using SS3 > - A character set designated to G3 by default > > At this moment, only Japanese EUC and its variants match the conditions. > > There are some encodings that use single-shifts: iso-2022-jp-2, > iso-2022-cn, and iso-2022-cn-ext. But > > - iso-2022-jp-2 and iso-2022-cn use SS2 and do not use SS3, > and > - iso-2022-cn-ext uses SS3 but in this encoding G3 is empty > at the boot time. > > In addition, iso-2022-cn-ext is a 7-bit encoding and therefore you can > assume that in a 8-bit encoding, namely only Japanese EUC and its > variants, a SS3 is followed by GR byte sequence, and treat the sequence > "SS3 + GL-byte" as a void character. > > The site above published the following patch. > Would you consider applying it? Thanks in advance. > > --- src/coding.c.orig 2010-04-04 07:26:13.000000000 +0900 > +++ src/coding.c 2010-09-24 16:42:33.000000000 +0900 > @@ -3853,8 +3853,14 @@ > else > charset = CHARSET_FROM_ID (charset_id_2); > ONE_MORE_BYTE (c1); > - if (c1 < 0x20 || (c1 >= 0x80 && c1 < 0xA0)) > - goto invalid_code; > + if (CODING_ISO_FLAGS (coding) & CODING_ISO_FLAG_SEVEN_BITS) { > + if (c1 < 0x20 || c1 >= 0x80) > + goto invalid_code; > + } > + else { > + if (c1 < 0xA0) > + goto invalid_code; > + } > break; > > case 'O': /* invocation of single-shift-3 */ > @@ -3867,8 +3873,14 @@ > else > charset = CHARSET_FROM_ID (charset_id_3); > ONE_MORE_BYTE (c1); > - if (c1 < 0x20 || (c1 >= 0x80 && c1 < 0xA0)) > - goto invalid_code; > + if (CODING_ISO_FLAGS (coding) & CODING_ISO_FLAG_SEVEN_BITS) { > + if (c1 < 0x20 || c1 >= 0x80) > + goto invalid_code; > + } > + else { > + if (c1 < 0xA0) > + goto invalid_code; > + } > break; > > case '0': case '2': case '3': case '4': /* start composition */ From unknown Thu Jun 19 16:24:17 2025 X-Loop: help-debbugs@gnu.org Subject: bug#8522: Arrow key trouble when keyboard encoding is euc-japan References: <4DADA451.7080809@dennougedougakkai-ndd.org> Resent-From: Handa Kenichi Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 18 Jul 2013 11:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8522 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Glenn Morris Cc: 8522@debbugs.gnu.org, delmonta@dennougedougakkai-ndd.org Received: via spool by 8522-submit@debbugs.gnu.org id=B8522.137414634329140 (code B ref 8522); Thu, 18 Jul 2013 11:20:02 +0000 Received: (at 8522) by debbugs.gnu.org; 18 Jul 2013 11:19:03 +0000 Received: from localhost ([127.0.0.1]:34697 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UzmEg-0007Zv-BZ for submit@debbugs.gnu.org; Thu, 18 Jul 2013 07:19:02 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:49242 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UzmEb-0007ZM-WD for 8522@debbugs.gnu.org; Thu, 18 Jul 2013 07:18:59 -0400 Received: from handa by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1UzmEZ-0001ul-SB; Thu, 18 Jul 2013 07:18:55 -0400 From: Handa Kenichi In-Reply-To: <70ppui8gr4.fsf@fencepost.gnu.org> (message from Glenn Morris on Tue, 16 Jul 2013 15:08:31 -0400) Date: Thu, 18 Jul 2013 07:18:55 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -5.4 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.4 (-----) In article <70ppui8gr4.fsf@fencepost.gnu.org>, Glenn Morris writes: > Please could you take a look at this report? > http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8522 Ok. Please wait for a while. --- Kenichi Handa handa@gnu.org > IIJIMA Hiromitsu wrote: > > I am using Emacs 23.2.1 on FreeBSD and RedHat (32-bit versions). > > > > I have configured keyboard-encoding-system be "euc-japan" because > > it is the terminal's default. > > > > But when I upgraded Emacs to ver. 23, arrow keys began to cause > > troubles when I run Emacs inside a terminal window (emacs -nw). > > > > When I move cursor with an arrow key, the cursor movement is > > reflected to the screen with one stroke delay. > > C-l shows the cursor's "real" position. > > It does not happen when I move cursor by C-f, C-n, etc. > > > > HOW-TO-REPEAT: Open a file and type C-x RET k euc-japan RET. > > > > According to the following site (in Japanese), > > http://slashdot.jp/~doda/journal/516198 > > the cause of this trouble is that arrow keys are passed to Emacs as > > ESC O {A,B,C,D} sequence and this "ESC O" is interpreted as ISO/IEC > > 2022's SS3 (single-shift 3) code. > > > > This trouble occurs when the following conditions are all met: > > - ISO/IEC 2022 compliant or their variants > > - Using SS3 > > - A character set designated to G3 by default > > > > At this moment, only Japanese EUC and its variants match the > > conditions. > > > > There are some encodings that use single-shifts: iso-2022-jp-2, > > iso-2022-cn, and iso-2022-cn-ext. But > > > > - iso-2022-jp-2 and iso-2022-cn use SS2 and do not use SS3, > > and > > - iso-2022-cn-ext uses SS3 but in this encoding G3 is empty > > at the boot time. > > > > In addition, iso-2022-cn-ext is a 7-bit encoding and therefore you > > can > > assume that in a 8-bit encoding, namely only Japanese EUC and its > > variants, a SS3 is followed by GR byte sequence, and treat the > > sequence > > "SS3 + GL-byte" as a void character. > > > > The site above published the following patch. > > Would you consider applying it? Thanks in advance. > > > > --- src/coding.c.orig 2010-04-04 07:26:13.000000000 +0900 > > +++ src/coding.c 2010-09-24 16:42:33.000000000 +0900 > > @@ -3853,8 +3853,14 @@ > > else > > charset = CHARSET_FROM_ID (charset_id_2); > > ONE_MORE_BYTE (c1); > > - if (c1 < 0x20 || (c1 >= 0x80 && c1 < 0xA0)) > > - goto invalid_code; > > + if (CODING_ISO_FLAGS (coding) & > > CODING_ISO_FLAG_SEVEN_BITS) { > > + if (c1 < 0x20 || c1 >= 0x80) > > + goto invalid_code; > > + } > > + else { > > + if (c1 < 0xA0) > > + goto invalid_code; > > + } > > break; > > > > case 'O': /* invocation of single-shift-3 */ > > @@ -3867,8 +3873,14 @@ > > else > > charset = CHARSET_FROM_ID (charset_id_3); > > ONE_MORE_BYTE (c1); > > - if (c1 < 0x20 || (c1 >= 0x80 && c1 < 0xA0)) > > - goto invalid_code; > > + if (CODING_ISO_FLAGS (coding) & > > CODING_ISO_FLAG_SEVEN_BITS) { > > + if (c1 < 0x20 || c1 >= 0x80) > > + goto invalid_code; > > + } > > + else { > > + if (c1 < 0xA0) > > + goto invalid_code; > > + } > > break; > > > > case '0': case '2': case '3': case '4': /* start > > composition */ From unknown Thu Jun 19 16:24:17 2025 X-Loop: help-debbugs@gnu.org Subject: bug#8522: Arrow key trouble when keyboard encoding is euc-japan References: <4DADA451.7080809@dennougedougakkai-ndd.org> In-Reply-To: <4DADA451.7080809@dennougedougakkai-ndd.org> Resent-From: Hiroki Sato Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 19 Jul 2013 03:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8522 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 8522@debbugs.gnu.org Cc: rgm@gnu.org, ashish@FreeBSD.org, hrs@FreeBSD.org, delmonta@dennougedougakkai-ndd.org Received: via spool by 8522-submit@debbugs.gnu.org id=B8522.13742046497099 (code B ref 8522); Fri, 19 Jul 2013 03:31:01 +0000 Received: (at 8522) by debbugs.gnu.org; 19 Jul 2013 03:30:49 +0000 Received: from localhost ([127.0.0.1]:36378 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V01P5-0001qN-68 for submit@debbugs.gnu.org; Thu, 18 Jul 2013 23:30:47 -0400 Received: from vlsi00.si.noda.tus.ac.jp ([133.31.130.32]:59273 helo=mail.allbsd.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V00yG-0000LB-5h for 8522@debbugs.gnu.org; Thu, 18 Jul 2013 23:03:05 -0400 Received: from alph.d.allbsd.org (p2049-ipbf1102funabasi.chiba.ocn.ne.jp [122.26.101.49]) (authenticated bits=128) by mail.allbsd.org (8.14.5/8.14.5) with ESMTP id r6J32gnt000127 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 19 Jul 2013 12:02:53 +0900 (JST) (envelope-from hrs@FreeBSD.org) Received: from localhost (localhost [IPv6:::1]) (authenticated bits=0) by alph.d.allbsd.org (8.14.5/8.14.5) with ESMTP id r6J32dtD051719; Fri, 19 Jul 2013 12:02:40 +0900 (JST) (envelope-from hrs@FreeBSD.org) Date: Fri, 19 Jul 2013 12:02:35 +0900 (JST) Message-Id: <20130719.120235.1144489001027944764.hrs@allbsd.org> From: Hiroki Sato X-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-Mailer: Mew version 6.5 on Emacs 24.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Multipart/Signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="--Security_Multipart(Fri_Jul_19_12_02_35_2013_159)--" Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.97.4 at gatekeeper.allbsd.org X-Virus-Status: Clean X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (mail.allbsd.org [133.31.130.32]); Fri, 19 Jul 2013 12:02:54 +0900 (JST) X-Spam-Status: No, score=-89.1 required=13.0 tests=CONTENT_TYPE_PRESENT, DIRECTOCNDYN,DYN_PBL,QENCPTR1,RCVD_IN_PBL,RCVD_IN_RP_RNBL,SPF_SOFTFAIL, USER_IN_WHITELIST autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gatekeeper.allbsd.org X-Spam-Score: 1.0 (+) X-Mailman-Approved-At: Thu, 18 Jul 2013 23:30:45 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) ----Security_Multipart(Fri_Jul_19_12_02_35_2013_159)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi, I could reproduce the problem in #8522 and am using Emacs 24.3 with the patch in [*] (basically the same as one submitted in #8522) on FreeBSD. It is working fine with no side effect. [*] http://svnweb.freebsd.org/ports/head/editors/emacs/files/patch-src_coding.c?view=markup&pathrev=281397 -- Hiroki ----Security_Multipart(Fri_Jul_19_12_02_35_2013_159)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (FreeBSD) iEYEABECAAYFAlHorEsACgkQTyzT2CeTzy0UjgCcCfPV/TsRdPcUixbavblnYpmf qm4AoM6JSCUIQDJRma9bLROvxw26bLDj =YjSb -----END PGP SIGNATURE----- ----Security_Multipart(Fri_Jul_19_12_02_35_2013_159)---- From unknown Thu Jun 19 16:24:17 2025 X-Loop: help-debbugs@gnu.org Subject: bug#8522: Arrow key trouble when keyboard encoding is euc-japan References: <4DADA451.7080809@dennougedougakkai-ndd.org> Resent-From: Handa Kenichi Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 20 Jul 2013 12:30:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8522 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Glenn Morris Cc: 8522@debbugs.gnu.org, delmonta@dennougedougakkai-ndd.org Received: via spool by 8522-submit@debbugs.gnu.org id=B8522.137432338630417 (code B ref 8522); Sat, 20 Jul 2013 12:30:03 +0000 Received: (at 8522) by debbugs.gnu.org; 20 Jul 2013 12:29:46 +0000 Received: from localhost ([127.0.0.1]:39190 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V0WIB-0007uT-Ee for submit@debbugs.gnu.org; Sat, 20 Jul 2013 08:29:45 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:34884 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V0WI8-0007uL-S0 for 8522@debbugs.gnu.org; Sat, 20 Jul 2013 08:29:41 -0400 Received: from handa by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1V0WI7-0007Hd-83; Sat, 20 Jul 2013 08:29:39 -0400 From: Handa Kenichi In-Reply-To: <70ppui8gr4.fsf@fencepost.gnu.org> (message from Glenn Morris on Tue, 16 Jul 2013 15:08:31 -0400) Date: Sat, 20 Jul 2013 08:29:39 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -5.4 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.4 (-----) In article <70ppui8gr4.fsf@fencepost.gnu.org>, Glenn Morris writes: > Please could you take a look at this report? > http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8522 I've just installed a little bit different fix. > IIJIMA Hiromitsu wrote: [...] > > According to the following site (in Japanese), > > http://slashdot.jp/~doda/journal/516198 > > the cause of this trouble is that arrow keys are passed to Emacs as > > ESC O {A,B,C,D} sequence and this "ESC O" is interpreted as ISO/IEC > > 2022's SS3 (single-shift 3) code. > > > > This trouble occurs when the following conditions are all met: > > - ISO/IEC 2022 compliant or their variants > > - Using SS3 > > - A character set designated to G3 by default > > > > At this moment, only Japanese EUC and its variants match the > > conditions. > > > > There are some encodings that use single-shifts: iso-2022-jp-2, > > iso-2022-cn, and iso-2022-cn-ext. But > > > > - iso-2022-jp-2 and iso-2022-cn use SS2 and do not use SS3, > > and > > - iso-2022-cn-ext uses SS3 but in this encoding G3 is empty > > at the boot time. > > > > In addition, iso-2022-cn-ext is a 7-bit encoding and therefore you > > can > > assume that in a 8-bit encoding, namely only Japanese EUC and its > > variants, a SS3 is followed by GR byte sequence, and treat the > > sequence > > "SS3 + GL-byte" as a void character. That analysis is correct. But, as ISO 2022 has a concept of "implementation level" which specifies which graphic plane (GL or GR) is indentified as the single-shift area, I introduced a new flag `8-bit-level-4' for ISO-2022 base coding system. By default, that flag is not set, thus the implementation level of the 2022 decoder is "4A" which means GR is identified as the single-shift area. So, the cursor key sequences ESC O A, etc are not recognized as a valid single-shift sequence, and thus those sequences are given to the normal key-sequence look-up mechanism. --- Kenichi Handa handa@gnu.org From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 20 15:21:23 2013 Received: (at control) by debbugs.gnu.org; 20 Jul 2013 19:21:23 +0000 Received: from localhost ([127.0.0.1]:39998 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V0ciY-0007AP-R8 for submit@debbugs.gnu.org; Sat, 20 Jul 2013 15:21:23 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:42796 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V0ciW-0007AE-J2 for control@debbugs.gnu.org; Sat, 20 Jul 2013 15:21:20 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1V0ciW-0004T7-9Q for control@debbugs.gnu.org; Sat, 20 Jul 2013 15:21:20 -0400 Date: Sat, 20 Jul 2013 15:21:20 -0400 Message-Id: Subject: control message for bug 8522 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -5.4 (-----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.4 (-----) close 8522 24.4