From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: Re: ucs method on non-supported unicode chars Date: Thu, 04 Jan 2007 10:27:53 +0900 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1167874106 13131 80.91.229.12 (4 Jan 2007 01:28:26 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 4 Jan 2007 01:28:26 +0000 (UTC) Cc: fx@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 04 02:28:24 2007 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 1H2HP5-0007lJ-Sh for ged-emacs-devel@m.gmane.org; Thu, 04 Jan 2007 02:28:24 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H2HP5-0000sm-C7 for ged-emacs-devel@m.gmane.org; Wed, 03 Jan 2007 20:28:23 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H2HOr-0000rl-Sq for emacs-devel@gnu.org; Wed, 03 Jan 2007 20:28:09 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H2HOq-0000o4-1D for emacs-devel@gnu.org; Wed, 03 Jan 2007 20:28:09 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H2HOp-0000nj-Ub for emacs-devel@gnu.org; Wed, 03 Jan 2007 20:28:07 -0500 Original-Received: from [150.29.246.133] (helo=mx1.aist.go.jp) by monty-python.gnu.org with esmtp (Exim 4.52) id 1H2HOk-0003Hz-71; Wed, 03 Jan 2007 20:28:02 -0500 Original-Received: from rqsmtp2.aist.go.jp (rqsmtp2.aist.go.jp [150.29.254.123]) by mx1.aist.go.jp with ESMTP id l041Rsr1019042; Thu, 4 Jan 2007 10:27:54 +0900 (JST) env-from (handa@m17n.org) Original-Received: from smtp2.aist.go.jp by rqsmtp2.aist.go.jp with ESMTP id l041Rsll010386; Thu, 4 Jan 2007 10:27:54 +0900 (JST) env-from (handa@m17n.org) Original-Received: by smtp2.aist.go.jp with ESMTP id l041RrFJ015703; Thu, 4 Jan 2007 10:27:53 +0900 (JST) env-from (handa@m17n.org) Original-Received: from handa by etlken.m17n.org with local (Exim 4.63) (envelope-from ) id 1H2HOb-0006am-QM; Thu, 04 Jan 2007 10:27:53 +0900 Original-To: "Juanma Barranquero" In-reply-to: (lekktu@gmail.com) User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/22.0.92 (i686-pc-linux-gnu) MULE/5.0 (SAKAKI) 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:64723 Archived-At: > On 12/18/06, Juanma Barranquero wrote: > > With function `ucs-insert' (from lisp/international/ucs-tables.el): > > > > M-x ucs-insert RET 4DF9 RET =3D> "Character U+4DF9 is not yet > > supported" (an error message). > > > > With ucs input method: > > > > U4DF9 =3D> "=E4=B7=B9" (in the buffer). > > > > Why does the ucs input method try to insert what it knows is an > > unsupported character? In which way it is better to get "=E4=B7=B9" tha= n a > > helpful error message? > > > > I ask because the behavior is clearly intentional. `utf-8-ccl-encode' > > is defined in leim/quail/uni-input.el, and `ucs-input-method' includes > > this error handling: > > > > (if c > > (list c) > > (aset status 0 n) > > (string-to-list (ccl-execute-on-string > > 'utf-8-ccl-encode status ""))) I have no idea about the intention of the code. If Dave doesn't respond, I suggest to install the attached patch. --- Kenichi Handa handa@m17n.org 2007-01-04 Kenichi Handa * quail/uni-input.el (ucs-input-method): Signal an error on unsupported Unicode character. *** uni-input.el 13 Dec 2006 10:08:30 +0900 1.14 --- uni-input.el 04 Jan 2007 10:22:51 +0900=09 *************** *** 107,119 **** (let* ((n (string-to-number (apply 'string (cdr (nreverse events))) 16)) ! (c (decode-char 'ucs n)) ! (status (make-vector 9 nil))) (if c (list c) ! (aset status 0 n) ! (string-to-list (ccl-execute-on-string ! 'utf-8-ccl-encode status "")))))) (quail-delete-overlays) (set-buffer-modified-p modified-p) (run-hooks 'input-method-after-insert-chunk-hook))))) --- 107,116 ---- (let* ((n (string-to-number (apply 'string (cdr (nreverse events))) 16)) ! (c (decode-char 'ucs n))) (if c (list c) ! (error "Character U+%04X is not yet supported" n))))) (quail-delete-overlays) (set-buffer-modified-p modified-p) (run-hooks 'input-method-after-insert-chunk-hook)))))