From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: YAMAMOTO Mitsuharu Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: Re: Fwd: 23.0.50; can't input chinese punctuation on w32 platform Date: Sat, 02 Feb 2008 10:37:26 +0900 Organization: Faculty of Science, Chiba University Message-ID: References: <42b562540801260432h43921157k7d4034ddfff28862@mail.gmail.com> <479B4BE3.2000204@gnu.org> <47A327A7.4060806@gnu.org> <47A34364.9020906@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Trace: ger.gmane.org 1201916277 18282 80.91.229.12 (2 Feb 2008 01:37:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 2 Feb 2008 01:37:57 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org, Eli Zaretskii , handa@ni.aist.go.jp, yujie052@gmail.com To: Jason Rumney Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Feb 02 02:38:17 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JL7Kj-0000NX-1I for ged-emacs-devel@m.gmane.org; Sat, 02 Feb 2008 02:38:17 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JL7KH-0002gn-5J for ged-emacs-devel@m.gmane.org; Fri, 01 Feb 2008 20:37:49 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JL7KB-0002e4-VF for emacs-devel@gnu.org; Fri, 01 Feb 2008 20:37:43 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JL7KA-0002ds-FB for emacs-devel@gnu.org; Fri, 01 Feb 2008 20:37:42 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JL7KA-0002dp-7o for emacs-devel@gnu.org; Fri, 01 Feb 2008 20:37:42 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JL7KA-00009V-6i for emacs-devel@gnu.org; Fri, 01 Feb 2008 20:37:42 -0500 Original-Received: from mx10.gnu.org ([199.232.76.166]) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1JL7K9-0001Cq-MJ for emacs-pretest-bug@gnu.org; Fri, 01 Feb 2008 20:37:41 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1JL7K6-00008p-Qm for emacs-pretest-bug@gnu.org; Fri, 01 Feb 2008 20:37:41 -0500 Original-Received: from ntp.math.s.chiba-u.ac.jp ([133.82.132.2] helo=mathmail.math.s.chiba-u.ac.jp) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JL7K0-00007n-2q; Fri, 01 Feb 2008 20:37:32 -0500 Original-Received: from church.math.s.chiba-u.ac.jp (church [133.82.132.36]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id D2B8B2C40; Sat, 2 Feb 2008 10:37:26 +0900 (JST) In-Reply-To: <47A34364.9020906@gnu.org> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/23.0.50 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) X-detected-kernel: by monty-python.gnu.org: NetBSD 3.0 (DF) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:87979 gmane.emacs.pretest.bugs:20850 Archived-At: >>>>> On Fri, 01 Feb 2008 16:05:56 +0000, Jason Rumney said: >>> AFAICT, CJK punctuation, Kana, Jamo, Kanbun, Bopomofo, CJK >>> radicals, Thai and possibly Greek and Cyrillic are potentially >>> problematic. >>> >> > I thought mule-unicode-* covers Greek and Cyrillic quite well. >> Doesn't it? >> > mule-unicode-* covers all the above. The issue is whether files > containing such characters can be written in the relevant non-UTF > coding systems. Even for Greek and Cyrillic, a user may want it mapped to japanese-jisx0208 rather than mule-unicode-* in some situation. FWIW, the Mac Carbon port handles Unicode keyboard events in the following way: * ASCII character, with or without modifiers -> ASCII_KEYSTROKE_EVENT * Non-ASCII character with some modifiers -> MULTIBYTE_CHAR_KEYSTROKE_EVENT with either CHARSET_8_BIT_CONTROL, charset_latin_iso8859_1, or charset_mule_unicode_* code. * Non-ASCII character without any modifiers -> The event comes with some script/language information. So we can distinguish mule-unicode-0100-24ff Greek from japanese-jisx0208 Greek in principle even though they have the same Unicode codepoint. Likewise for CJK characters. Because the usual Emacs keyboard events cannot carry such script/language information, we pack the raw Unicode text input data and the script/language info into a special event MAC_APPLE_EVENT instead. Then it is decoded at the Lisp level. (define-key special-event-map [mac-apple-event] 'mac-dispatch-apple-event) (define-key mac-apple-event-map [text-input unicode-for-key-event] 'mac-ts-unicode-for-key-event) (defun mac-ts-unicode-for-key-event (event) "Convert Unicode key EVENT to Emacs key events and unread them." (interactive "e") (let* ((ae (mac-event-ae event)) (text (cdr (mac-ae-parameter ae "tstx" "utxt"))) (script-language (mac-ae-script-language ae "tssl")) (coding (or (cdr (assq (car script-language) mac-script-code-coding-systems)) 'mac-roman))) (if text (mac-unread-string (mac-utxt-to-string text coding))))) As for the W32 port, Emacs 22.2 should avoid drastic changes in general. How about using the new code (i.e., mapping to mule-unicode-* etc.) only for the with-modifier case, and leaving the without-modifier case to encoded-kb as in Emacs 22.1? YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp