From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jason Rumney Newsgroups: gmane.emacs.bugs Subject: bug#10299: Emacs doesn't handle Unicode characters in keyboard layout on MS Windows Date: Thu, 15 Dec 2011 22:40:15 +0800 Message-ID: <8739clgapc.fsf@gnu.org> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1323960108 29435 80.91.229.12 (15 Dec 2011 14:41:48 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 15 Dec 2011 14:41:48 +0000 (UTC) Cc: Joakim =?UTF-8?Q?H=C3=A5rsman?= , 10299@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Dec 15 15:41:41 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RbCVB-0007Wn-Ci for geb-bug-gnu-emacs@m.gmane.org; Thu, 15 Dec 2011 15:41:41 +0100 Original-Received: from localhost ([::1]:46732 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RbCVA-0000OB-8T for geb-bug-gnu-emacs@m.gmane.org; Thu, 15 Dec 2011 09:41:40 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:53457) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RbCV6-0000Na-TG for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2011 09:41:37 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RbCV2-0003KU-N8 for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2011 09:41:36 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:38454) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RbCV2-0003KN-Lc for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2011 09:41:32 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1RbCWT-00025f-V2 for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2011 09:43:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Jason Rumney Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 15 Dec 2011 14:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10299 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 10299-submit@debbugs.gnu.org id=B10299.13239601337978 (code B ref 10299); Thu, 15 Dec 2011 14:43:01 +0000 Original-Received: (at 10299) by debbugs.gnu.org; 15 Dec 2011 14:42:13 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RbCVf-00024c-Rx for submit@debbugs.gnu.org; Thu, 15 Dec 2011 09:42:13 -0500 Original-Received: from mail-gy0-f172.google.com ([209.85.160.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RbCVW-00024D-9b for 10299@debbugs.gnu.org; Thu, 15 Dec 2011 09:42:06 -0500 Original-Received: by ghrr16 with SMTP id r16so1528923ghr.3 for <10299@debbugs.gnu.org>; Thu, 15 Dec 2011 06:40:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type:content-transfer-encoding; bh=YSlly5xzX6OPHZjzEix87Rg96QHAl6j2hUZI2T/Vh4U=; b=GgEUz9TNZ9j1l8ATBg8I0e6Rn7TAo/Pu3mso4atIrVpdHtF3TdHqx87ij0ltCW7+K0 rVPdxd2D0jDudCOitv+7l6pE63wWyF4AYBei2YVcrcARXBQ/Y8Brx+APq94SgAqJgVsn qWylIKabpN6ziaP+INaGuyCTYF7tbkDNTMTdg= Original-Received: by 10.50.236.40 with SMTP id ur8mr3166978igc.91.1323960031769; Thu, 15 Dec 2011 06:40:31 -0800 (PST) Original-Received: from home.jasonrumney.net ([180.75.128.157]) by mx.google.com with ESMTPS id py9sm10950385igc.2.2011.12.15.06.40.25 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 15 Dec 2011 06:40:29 -0800 (PST) Original-Received: by home.jasonrumney.net (Postfix, from userid 1000) id 5678DE0A; Thu, 15 Dec 2011 22:40:16 +0800 (MYT) In-Reply-To: (Eli Zaretskii's message of "Thu, 15 Dec 2011 01:22:11 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.91 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Thu, 15 Dec 2011 09:43:01 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:54987 Archived-At: Eli Zaretskii writes: >> Date: Wed, 14 Dec 2011 21:39:28 +0100 >> From: Joakim H=C3=A5rsman >>=20 >> However, Emacs doesn't seem to handle the case when the keyboard >> layout contains characters not available in the ANSI code page, and >> just prints a question mark character instead. > > Yes, Emacs on Windows uses the ANSI codepage to read the keyboard > input. Does it help to play with the value of keyboard-coding-system? It tries to use Unicode if the Windows input method is sending it. The problem here is that there is no standard for Windows input methods, so even the ones built into Windows act differently for different languages and for the same language across different versions of Windows. Some input methods will send WM_UNICHAR messages with the Unicode character, which can be intercepted before they are turned into question marks by Windows. These will just work with Emacs. Others will send character codes corresponding to the codepoints in the default Windows codepage for that language (regardless of your system codepage). These can be handled by changing keyboard-coding-system within Emacs. Others will not send anything useful unless your system codepage is set appropriately for the language being input. It sounds like this one may be in the third category.