[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ucs method on non-supported unicode chars
From: |
Kenichi Handa |
Subject: |
Re: ucs method on non-supported unicode chars |
Date: |
Thu, 04 Jan 2007 10:27:53 +0900 |
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) |
> On 12/18/06, Juanma Barranquero <address@hidden> wrote:
> > With function `ucs-insert' (from lisp/international/ucs-tables.el):
> >
> > M-x ucs-insert RET 4DF9 RET => "Character U+4DF9 is not yet
> > supported" (an error message).
> >
> > With ucs input method:
> >
> > U4DF9 => "ä·¹" (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 "ä·¹" than 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
address@hidden
2007-01-04 Kenichi Handa <address@hidden>
* 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
***************
*** 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)))))