From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Joakim =?UTF-8?Q?H=C3=A5rsman?= Newsgroups: gmane.emacs.bugs Subject: bug#10299: Emacs doesn't handle Unicode characters in keyboard layout on MS Windows Date: Mon, 19 Dec 2011 12:04:46 +0100 Message-ID: References: <8739clgapc.fsf@gnu.org> <83zket20xw.fsf@gnu.org> <83vcph0w9t.fsf@gnu.org> <83obv821wv.fsf@gnu.org> <831us31atj.fsf@gnu.org> <83pqflzr1d.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1324292737 22761 80.91.229.12 (19 Dec 2011 11:05:37 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 19 Dec 2011 11:05:37 +0000 (UTC) Cc: 10299@debbugs.gnu.org To: Lennart Borgman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Dec 19 12:05:27 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 1Rcb26-0004Hs-Ug for geb-bug-gnu-emacs@m.gmane.org; Mon, 19 Dec 2011 12:05:27 +0100 Original-Received: from localhost ([::1]:50600 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rcb26-0007BH-28 for geb-bug-gnu-emacs@m.gmane.org; Mon, 19 Dec 2011 06:05:26 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:56208) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rcb1u-0007B6-GS for bug-gnu-emacs@gnu.org; Mon, 19 Dec 2011 06:05:23 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rcb1q-0000rh-1O for bug-gnu-emacs@gnu.org; Mon, 19 Dec 2011 06:05:14 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:43024) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rcb1p-0000rd-Uo for bug-gnu-emacs@gnu.org; Mon, 19 Dec 2011 06:05:10 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Rcb3d-0000ac-Ox for bug-gnu-emacs@gnu.org; Mon, 19 Dec 2011 06:07:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Joakim =?UTF-8?Q?H=C3=A5rsman?= Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Dec 2011 11:07: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.13242928032243 (code B ref 10299); Mon, 19 Dec 2011 11:07:01 +0000 Original-Received: (at 10299) by debbugs.gnu.org; 19 Dec 2011 11:06:43 +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 1Rcb3K-0000a7-G7 for submit@debbugs.gnu.org; Mon, 19 Dec 2011 06:06:43 -0500 Original-Received: from mail-ey0-f172.google.com ([209.85.215.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Rcb3H-0000a1-SJ for 10299@debbugs.gnu.org; Mon, 19 Dec 2011 06:06:40 -0500 Original-Received: by eaad1 with SMTP id d1so4480190eaa.3 for <10299@debbugs.gnu.org>; Mon, 19 Dec 2011 03:04:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=iMvCNNJqPtvO8M0xdhPhuaVTwt36ZcDiHudpcLIUNuE=; b=sBOHEB3/OuTNc/mr8pk9obo9qvRoOiPCp1elEvvQBzW2xrPHk2BU4NNqpBFpUnBBJT RAUQM2+CG5F1syP8q5jiprSbpwY3lQSRypsQsUmDUS8yCBFu56YWxqQ0VrDq04k/Rezv 70vEn0yX3rEAahL/2Nbh2BNIE1gmd62AA4Onk= Original-Received: by 10.204.128.130 with SMTP id k2mr1174893bks.7.1324292687058; Mon, 19 Dec 2011 03:04:47 -0800 (PST) Original-Received: by 10.204.58.209 with HTTP; Mon, 19 Dec 2011 03:04:46 -0800 (PST) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 19 Dec 2011 06:07: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:55060 Archived-At: On 19 December 2011 11:59, Lennart Borgman wrot= e: > On Mon, Dec 19, 2011 at 11:44, Joakim H=E5rsman wrote: >> On 18 December 2011 19:13, Eli Zaretskii wrote: >>>> Date: Sun, 18 Dec 2011 18:31:55 +0100 >>>> From: Joakim H=E5rsman >>>> >>>> > That's good news. =A0However, I'm puzzled: are you saying that the c= ode >>>> > points passed by Windows to Emacs for the characters generated by MK= LC >>>> > are outside the Unicode BMP, i.e. larger than 65535? =A0If so, what = code >>>> > points are they? >>>> >>>> No, none of the characters I needed are outside the BMP. >>>> >>>> WM_CHAR encodes the codepoint in UTF-16 inside wParam, while >>>> WM_UNICHAR uses UTF-32. So if I press something which gives U+2218 >>>> RING OPERATOR, I get a WM_CHAR event with a wParam of 2228248 or >>>> 0x220018. >>> >>> ??? UTF-16 encodes the characters in the BMP as themselves, i.e. a >>> single 16-bit value that is numerically identical to the codepoint. >>> That is, you should have gotten 0x2218. =A0What am I missing? >> >> I just assumed Windows encoded the codepoints into a DWORD in some >> funky way, but looking more closely at the documentattion it appears >> like wParam should just be the codepoint. Even more strangely, some >> places claim that if a keyboard produces a character outside the BMP, >> you get two WM_CHAR events. >> >> From what I can tell, Emacs itself never alters wParam, but I guess >> Windows might do some funky multibyte encoding since Emacs isn't >> completely Unicode? > > Maybe Emacs on windows still is using the ANSI version of DefWindowProc? = See > > http://blogs.msdn.com/b/michkap/archive/2007/03/25/1945659.aspx I looked at that page as well, but it says that the ANSI DefWindowProc is supposed to post one or two ANSI characters, and it definitely isn't doing that. I get teh correct Unciode character, just spread over the low and high word of the wParam dword.