From unknown Sun Aug 17 09:10:26 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#396 <396@debbugs.gnu.org> To: bug#396 <396@debbugs.gnu.org> Subject: Status: 23.0.60; Quail (swedish postfix) broken in console Reply-To: bug#396 <396@debbugs.gnu.org> Date: Sun, 17 Aug 2025 16:10:26 +0000 retitle 396 23.0.60; Quail (swedish postfix) broken in console reassign 396 emacs submitter 396 "E. Anders Lannerb=C3=A4ck" severity 396 normal thanks From eal@lannerback.net Thu Jun 12 05:56:15 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-7.9 required=4.0 tests=BAYES_00,FOURLA, RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 12 Jun 2008 12:56:15 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m5CCuASg000583 for ; Thu, 12 Jun 2008 05:56:13 -0700 Received: from mx10.gnu.org ([199.232.76.166]:48289) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1K6mJa-00012K-O5 for emacs-pretest-bug@gnu.org; Thu, 12 Jun 2008 08:54:06 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1K6mLV-0001Xa-8g for emacs-pretest-bug@gnu.org; Thu, 12 Jun 2008 08:56:09 -0400 Received: from proxy3.bredband.net ([195.54.101.73]:36650) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K6mLU-0001X8-TJ for emacs-pretest-bug@gnu.org; Thu, 12 Jun 2008 08:56:05 -0400 Received: from ironport.bredband.com (195.54.101.120) by proxy3.bredband.net (7.3.127) id 481183EA00E302AF for emacs-pretest-bug@gnu.org; Thu, 12 Jun 2008 14:56:02 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhM4ABW6UEhV4nOzPGdsb2JhbACBW5A3AQEBAS2bKw Received: from c-b373e255.07-158-73746f32.cust.bredbandsbolaget.se (HELO sol.lannerback.net) ([85.226.115.179]) by ironport1.bredband.com with ESMTP; 12 Jun 2008 14:56:02 +0200 Received: by sol.lannerback.net (Postfix, from userid 1000) id 842C35C036; Thu, 12 Jun 2008 14:56:02 +0200 (CEST) From: "E. Anders =?iso-8859-1?Q?Lannerb=E4ck?=" To: emacs-pretest-bug@gnu.org Subject: 23.0.60; Quail (swedish postfix) broken in console MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Message-Id: <20080612125602.842C35C036@sol.lannerback.net> Date: Thu, 12 Jun 2008 14:56:02 +0200 (CEST) Content-Transfer-Encoding: Quoted-Printable X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. Since the merge of the unicode branch on Feb 1, the quail package swedish-postfix has been broken in console. When using X11 it works. Also, there is no problem to use the Swedish keyboard, so I believe that the problem is in quail. How to reproduce: emacs -q -nw C-x b f o o RET C-x RET C-\ s w e d i s h - p o s t f i x RET a a SPC SPC Instead of the string "=C3=A5 " I end up with =E5=A0=A0 (#x5820). =20 Regards /Anders L From monnier@iro.umontreal.ca Sat Jun 14 21:46:47 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-4.5 required=4.0 tests=AWL,BAYES_00,FOURLA, HAS_BUG_NUMBER,MURPHY_DRUGS_REL8 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 396-close) by emacsbugs.donarmstrong.com; 15 Jun 2008 04:46:47 +0000 Received: from ironport2-out.teksavvy.com (ironport2-out.pppoe.ca [206.248.154.182]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m5F4kgAY006001 for <396-close@emacsbugs.donarmstrong.com>; Sat, 14 Jun 2008 21:46:44 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArcEAPA6VEjO+KWv/2dsb2JhbACBW6pa X-IronPort-AV: E=Sophos;i="4.27,646,1204520400"; d="scan'208";a="22664455" Received: from smtp.pppoe.ca (HELO smtp.teksavvy.com) ([65.39.196.238]) by ironport2-out.teksavvy.com with ESMTP; 15 Jun 2008 00:46:37 -0400 Received: from pastel.home ([206.248.165.175]) by smtp.teksavvy.com (Internet Mail Server v1.0) with ESMTP id VKJ06237; Sun, 15 Jun 2008 00:46:37 -0400 Received: by pastel.home (Postfix, from userid 20848) id A19407FBD; Sun, 15 Jun 2008 00:46:36 -0400 (EDT) From: Stefan Monnier To: 396-close@debbugs.gnu.org, Kenichi Handa Subject: Re: bug#396: 23.0.60; Quail (swedish postfix) broken in console Message-ID: References: <20080612125602.842C35C036@sol.lannerback.net> Date: Sun, 15 Jun 2008 00:46:36 -0400 In-Reply-To: <20080612125602.842C35C036@sol.lannerback.net> (E. Anders's message of "Thu, 12 Jun 2008 14:56:02 +0200 (CEST)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable > Since the merge of the unicode branch on Feb 1, the quail package > swedish-postfix has been broken in console. When using X11 it works. > Also, there is no problem to use the Swedish keyboard, so I believe that > the problem is in quail. > C-x b f o o RET C-x RET C-\ s w e d i s h - p o s t > f i x RET a a SPC SPC > Instead of the string "=C3=A5 " I end up with =E5=A0=A0 (#x5820).=20=20 Yuck! Here's what seems to be happening: quail takes a sequence of bytes from your terminal, interprets them as ascii chars, and turns this sequence into another sequence, which is composed of latin-1 chars, but which encoded-kbd then takes for bytes coming straight from your terminal, so it decodes this sequence as a utf-8 encoded char: "a a" turns into #xe5 and somehow encoded-kbd confuses "#xe5 SPC SPC" for "#xE5 #xA0 #xA0". I've installed the patch below which should fix your problem most of the time. But to fix it right, I think we'd need to hook encoded-kbd earlier in the chain so it gets processed before input-methods are run. Stefan --- encoded-kb.el.~1.45.~ 2008-05-06 23:35:23.000000000 -0400 +++ encoded-kb.el 2008-06-15 00:39:58.000000000 -0400 @@ -219,8 +219,9 @@ =20 (defun encoded-kbd-self-insert-utf-8 (arg) (interactive "p") - (let ((char (encoded-kbd-last-key)) - len) + (let* ((lead (encoded-kbd-last-key)) + (char lead) + len event) (cond ((< char #xE0) (setq len 1 char (logand char #x1F))) ((< char #xF0) @@ -230,8 +231,22 @@ (t (setq len 4 char 0))) (while (> len 0) - (setq char (logior (lsh char 6) (logand (read-char-exclusive) #x3F)) - len (1- len))) + (setq event (read-char-exclusive)) + (if (and (>=3D event #x80) (< event #xc0)) + ;; Valid utf-8 sequence. + (setq char (logior (lsh char 6) (- event #x80)) + len (1- len)) + ;; Invalid utf-8 sequence. Might be because Quail got involved + ;; in-between and the bytes we thought we were reading were actual= ly + ;; latin-1 chars. Let's presume that `event' is the second "byte", + ;; i.e. there weren't any "apprently correct" between `lead' and + ;; `event': it's easy to recover in this case, and the more general + ;; case seems pretty unlikely. + ;; FIXME: We should really do encoded-kbd decoding before processi= ng + ;; input-methods. + (push event unread-command-events) + (setq char lead) + (setq len 0))) (vector char))) =20 (defun encoded-kbd-setup-keymap (keymap coding) From unknown Sun Aug 17 09:10:26 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: $requester Subject: Internal Control Message-Id: bug archived. Date: Sun, 13 Jul 2008 14:24:03 +0000 User-Agent: Fakemail v42.6.9 # A New Hope # A log time ago, in a galaxy far, far away # something happened. # # Magically this resulted in the following # action being taken, but this fake control # message doesn't tell you why it happened # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator