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:50:28 +0100 Message-ID: <55499788-D3D5-46D6-810E-27884E712125@gmail.com> 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 (iPhone Mail 8L1) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1324295555 9702 80.91.229.12 (19 Dec 2011 11:52:35 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 19 Dec 2011 11:52:35 +0000 (UTC) Cc: "10299@debbugs.gnu.org" <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:52: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 1Rcbla-0007TI-VP for geb-bug-gnu-emacs@m.gmane.org; Mon, 19 Dec 2011 12:52:27 +0100 Original-Received: from localhost ([::1]:60590 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rcbla-0008Rh-9l for geb-bug-gnu-emacs@m.gmane.org; Mon, 19 Dec 2011 06:52:26 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:48416) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RcblV-0007st-4T for bug-gnu-emacs@gnu.org; Mon, 19 Dec 2011 06:52:24 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RcblK-0000dT-7M for bug-gnu-emacs@gnu.org; Mon, 19 Dec 2011 06:52:15 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:43055) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RcblK-0000dO-5j for bug-gnu-emacs@gnu.org; Mon, 19 Dec 2011 06:52:10 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Rcbn8-0001hn-3g for bug-gnu-emacs@gnu.org; Mon, 19 Dec 2011 06:54:02 -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:54:02 +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.13242956106485 (code B ref 10299); Mon, 19 Dec 2011 11:54:02 +0000 Original-Received: (at 10299) by debbugs.gnu.org; 19 Dec 2011 11:53:30 +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 1Rcbmb-0001gY-O6 for submit@debbugs.gnu.org; Mon, 19 Dec 2011 06:53:30 -0500 Original-Received: from mail-lpp01m010-f44.google.com ([209.85.215.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RcbmY-0001gP-Hy for 10299@debbugs.gnu.org; Mon, 19 Dec 2011 06:53:27 -0500 Original-Received: by laah2 with SMTP id h2so2131064laa.3 for <10299@debbugs.gnu.org>; Mon, 19 Dec 2011 03:51:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=subject:references:from:content-transfer-encoding:content-type :in-reply-to:message-id:date:cc:to:mime-version:x-mailer; bh=IqE6v4xtWyzsQ6dcPO5M8SmIQHhltDUOPnVxZZkwzsc=; b=BtDFb3Bc5i7GzVH4iFJbNc8x03+/RLm8fKgvcRXmeNW4GaYyrJ1FbbR9M4LLLyuTV0 o/m5FD9vh0qWyy2aa+3p5Z9ow0vXD6Eqz6yO4o+9RpT0UClFT+NxLKIzaQsmIOsQU1uv r24IukgMECyAvckzEPa1axj1Jzpfl3O+LK4dI= Original-Received: by 10.152.125.196 with SMTP id ms4mr15875941lab.50.1324295492063; Mon, 19 Dec 2011 03:51:32 -0800 (PST) Original-Received: from [2.64.252.194] (2.64.252.194.mobile.tre.se. [2.64.252.194]) by mx.google.com with ESMTPS id jn4sm16690681lab.16.2011.12.19.03.51.27 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 19 Dec 2011 03:51:31 -0800 (PST) In-Reply-To: X-Mailer: iPhone Mail (8L1) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 19 Dec 2011 06:54:02 -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:55063 Archived-At: I'm not the right person to ask, but presumably to remain compatible with Wi= ndows 95. Not all wide/Unicode apis are available there.=20 19 dec 2011 kl. 12:17 skrev Lennart Borgman : > On Mon, Dec 19, 2011 at 12:04, Joakim H=C3=A5rsman wrote: >> On 19 December 2011 11:59, Lennart Borgman wr= ote: >>> On Mon, Dec 19, 2011 at 11:44, Joakim H=C3=A5rsman wrote: >>>> On 18 December 2011 19:13, Eli Zaretskii wrote: >>>>>> Date: Sun, 18 Dec 2011 18:31:55 +0100 >>>>>> From: Joakim H=C3=A5rsman >>>>>>=20 >>>>>>> That's good news. However, I'm puzzled: are you saying that the cod= e >>>>>>> points passed by Windows to Emacs for the characters generated by MK= LC >>>>>>> are outside the Unicode BMP, i.e. larger than 65535? If so, what co= de >>>>>>> points are they? >>>>>>=20 >>>>>> No, none of the characters I needed are outside the BMP. >>>>>>=20 >>>>>> 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. >>>>>=20 >>>>> ??? 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. What am I missing? >>>>=20 >>>> 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. >>>>=20 >>>> =46rom 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? >>>=20 >>> Maybe Emacs on windows still is using the ANSI version of DefWindowProc?= See >>>=20 >>> http://blogs.msdn.com/b/michkap/archive/2007/03/25/1945659.aspx >>=20 >> 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. >=20 > Strange. What is the reason Emacs is still using the ANSI version? > Maybe a mix of ANSI and UNICODE versions gives strange results?