all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kenichi Handa <handa@m17n.org>
Cc: fx@gnu.org, emacs-devel@gnu.org
Subject: Re: ucs method on non-supported unicode chars
Date: Thu, 04 Jan 2007 10:27:53 +0900	[thread overview]
Message-ID: <E1H2HOb-0006am-QM@etlken.m17n.org> (raw)
In-Reply-To: <f7ccd24b0701021607k1d699df4k1c89b11284d28b82@mail.gmail.com> (lekktu@gmail.com)

> On 12/18/06, Juanma Barranquero <lekktu@gmail.com> 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
handa@m17n.org


2007-01-04  Kenichi Handa  <handa@m17n.org>

	* 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)))))

  reply	other threads:[~2007-01-04  1:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-18 11:21 ucs method on non-supported unicode chars Juanma Barranquero
2007-01-03  0:07 ` Juanma Barranquero
2007-01-04  1:27   ` Kenichi Handa [this message]
2007-01-08  0:41     ` Juanma Barranquero
2007-01-12  4:26       ` Kenichi Handa
2007-01-12  8:56         ` Juanma Barranquero
2007-01-12 11:36           ` Kenichi Handa

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1H2HOb-0006am-QM@etlken.m17n.org \
    --to=handa@m17n.org \
    --cc=emacs-devel@gnu.org \
    --cc=fx@gnu.org \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.