From: YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
To: Jason Rumney <jasonr@gnu.org>
Cc: emacs-pretest-bug@gnu.org, Eli Zaretskii <eliz@gnu.org>,
handa@ni.aist.go.jp, yujie052@gmail.com
Subject: Re: Fwd: 23.0.50; can't input chinese punctuation on w32 platform
Date: Sat, 02 Feb 2008 10:37:26 +0900 [thread overview]
Message-ID: <wl63x8w33d.wl%mituharu@math.s.chiba-u.ac.jp> (raw)
In-Reply-To: <47A34364.9020906@gnu.org>
>>>>> On Fri, 01 Feb 2008 16:05:56 +0000, Jason Rumney <jasonr@gnu.org> 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
next prev parent reply other threads:[~2008-02-02 1:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <42b562540801260432h43921157k7d4034ddfff28862@mail.gmail.com>
2008-01-26 15:04 ` Fwd: 23.0.50; can't input chinese punctuation on w32 platform Jason Rumney
2008-02-01 7:30 ` Kenichi Handa
2008-02-01 12:33 ` yu jie
2008-02-01 14:07 ` Jason Rumney
2008-02-01 15:37 ` Eli Zaretskii
2008-02-01 16:05 ` Jason Rumney
2008-02-02 1:37 ` YAMAMOTO Mitsuharu [this message]
2008-02-02 10:22 ` Eli Zaretskii
[not found] ` <47A8FEBA.8000304@gnu.org>
2008-02-06 9:57 ` 23.0.50; can't input chinese punctuation on win32 platform Zhang Wei
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=wl63x8w33d.wl%mituharu@math.s.chiba-u.ac.jp \
--to=mituharu@math.s.chiba-u.ac.jp \
--cc=eliz@gnu.org \
--cc=emacs-pretest-bug@gnu.org \
--cc=handa@ni.aist.go.jp \
--cc=jasonr@gnu.org \
--cc=yujie052@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).