From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#37530: 26.1; Tack characters translated incorrectly Date: Fri, 27 Sep 2019 15:03:19 +0200 Message-ID: <87r241q4bs.fsf@gnus.org> References: <83zhiqjom4.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="143749"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Axel Svensson , 37530@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Sep 27 15:58:04 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iDql1-000bGI-59 for geb-bug-gnu-emacs@m.gmane.org; Fri, 27 Sep 2019 15:58:03 +0200 Original-Received: from localhost ([::1]:51118 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iDqkz-0004P5-8C for geb-bug-gnu-emacs@m.gmane.org; Fri, 27 Sep 2019 09:58:01 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33001) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iDq6m-0006Xs-KJ for bug-gnu-emacs@gnu.org; Fri, 27 Sep 2019 09:16:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iDq6k-0007X1-Jv for bug-gnu-emacs@gnu.org; Fri, 27 Sep 2019 09:16:28 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37167) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iDq6c-0007TM-Om for bug-gnu-emacs@gnu.org; Fri, 27 Sep 2019 09:16:18 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iDpuk-0004Aa-BW for bug-gnu-emacs@gnu.org; Fri, 27 Sep 2019 09:04:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 27 Sep 2019 13:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37530 X-GNU-PR-Package: emacs Original-Received: via spool by 37530-submit@debbugs.gnu.org id=B37530.156958940615986 (code B ref 37530); Fri, 27 Sep 2019 13:04:02 +0000 Original-Received: (at 37530) by debbugs.gnu.org; 27 Sep 2019 13:03:26 +0000 Original-Received: from localhost ([127.0.0.1]:45965 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iDpu9-00049l-Vr for submit@debbugs.gnu.org; Fri, 27 Sep 2019 09:03:26 -0400 Original-Received: from quimby.gnus.org ([80.91.231.51]:58496) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iDpu7-00049d-RR for 37530@debbugs.gnu.org; Fri, 27 Sep 2019 09:03:24 -0400 Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iDpu3-0001Vd-Hi; Fri, 27 Sep 2019 15:03:22 +0200 In-Reply-To: <83zhiqjom4.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 27 Sep 2019 08:26:59 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.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" Xref: news.gmane.org gmane.emacs.bugs:167375 Archived-At: Eli Zaretskii writes: > Isn't the output of "C-h l" evidence that Emacs actually received the > codepoints it displayed? IOW, how do we know this is a problem in > Emacs and not in the keyboard configuration and/or driver software? I've always wondered how Emacs actually does this thing, but have never had a peek, so I rummaged around in keyboard.c for a bit. If I'm reading the code right, we get an event, and then pick out the symbol_num from that (and that's probably they keycode in X parlance), and then we end up here (under X): /* Convert a keysym to its name. */ char * get_keysym_name (int keysym) { char *value; block_input (); value =3D XKeysymToString (keysym); unblock_input (); return value; } But I'm a bit lost in how that name is translated into a character. Uhm... OK, there's a hash table called x-keysym-table. (format "%x" (gethash #x0bc2 x-keysym-table)) =3D> "22a5" > > #define XKB_KEY_downtack 0x0bc2 /* U+22A4 DOWN TA= CK */ > > #define XKB_KEY_uptack 0x0bce /* U+22A5 UP TACK= */ > > #define XKB_KEY_lefttack 0x0bdc /* U+22A3 LEFT TA= CK */ > > #define XKB_KEY_righttack 0x0bfc /* U+22A2 RIGHT TACK */ And that's wrong, according to the bug reporter. Now where does that come from? Some grepping shows w-win.el: ;; Table from Kuhn's proposed additions to the `KEYSYM Encoding' ;; appendix to the X protocol definition. (dolist ... (#xbc2 . ?=E2=8A=A5) Oh, there it is. Character code properties: customize what to show name: UP TACK general-category: Sm (Symbol, Math) decomposition: (8869) ('=E2=8A=A5') So we've got some wrong data in x-win.el? --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no