emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Function ucs-insert Cannot Insert Supplementary Characters


From: Kenichi Handa
Subject: Re: Function ucs-insert Cannot Insert Supplementary Characters
Date: Mon, 29 Mar 2004 21:06:09 +0900 (JST)
User-agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.3 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI)

In article <address@hidden>, Alexander Winston <address@hidden> writes:
> I ran "M-x ucs-insert <RET> 1D122 <RET>" and the error "ucs-insert:
> Character can't be decoded to UCS" appeared in the "*Messages*" buffer.

> The supplementary character U+01D122 is merely an example. The bug can
> be reproduced using any other supplementary character.

Emacs still doesn't support any supplementary character.  It
supports only these Unicode BMP characters:
        U+0000..U+33FF, U+E000..U+FFFF
When you turn on utf-translate-cjk-mode, more CJK characters
in BMP (not all) are supported.

But, the above error message is not good.  I've just
installed the attached fix.

If you really have to handle supplementary characters in
Emacs, please try the emacs-unicode-2 branch of the CVS.
This version supports all Unicode characters.

By the way, do you know any free font that contains glyphs
in supplementary characters?  Do you know about the
convention for specifying CHARSET_REGISTRY and
CHARSET_ENCODING fields of such a font?  Is it iso10646-2?

---
Ken'ichi HANDA
address@hidden

*** ucs-tables.el       10 Dec 2003 08:17:57 +0900      1.35
--- ucs-tables.el       29 Mar 2004 20:59:36 +0900      
***************
*** 1247,1258 ****
    "Insert the Emacs character representation of the given Unicode.
  Interactively, prompts for a hex string giving the code."
    (interactive "sUnicode (hex): ")
!   (let ((c (decode-char 'ucs (if (integerp arg)
!                                arg
!                              (string-to-number arg 16)))))
      (if c
        (insert c)
!       (error "Character can't be decoded to UCS"))))
  
  ;;; Dealing with non-8859 character sets.
  
--- 1247,1260 ----
    "Insert the Emacs character representation of the given Unicode.
  Interactively, prompts for a hex string giving the code."
    (interactive "sUnicode (hex): ")
!   (or (integerp arg)
!       (setq arg (string-to-number arg 16)))
!   (let ((c (decode-char 'ucs arg )))
      (if c
        (insert c)
!       (if (or (< arg 0) (> arg #x10FFFF))
!         (error "Not a Unicode character code: 0x%X" arg)
!       (error "Character U+%04X is not yet supported" arg)))))
  
  ;;; Dealing with non-8859 character sets.
  




reply via email to

[Prev in Thread] Current Thread [Next in Thread]