(insert-char-data): Print code-point of `ideograph-daikanwa' as a
authortomo <tomo>
Mon, 31 Jan 2000 10:46:24 +0000 (10:46 +0000)
committertomo <tomo>
Mon, 31 Jan 2000 10:46:24 +0000 (10:46 +0000)
decimal value.
(decode-builtin-char): New function.

lisp/utf-2000/char-db-util.el

index a7f4e37..460d985 100644 (file)
                 (insert
                  (format
                   (if has-long-ccs-name
-                      "(%-26s . %X)
+                      (if (eq ret (find-charset 'ideograph-daikanwa))
+                          "(%-26s . %d)
     "
-                    "(%-18s . %X)
+                        "(%-26s . #x%X)
     "
-                    )
+                        )
+                    (if (eq ret (find-charset 'ideograph-daikanwa))
+                        "(%-18s . %d)
+    "
+                      "(%-18s . #x%X)
+    "
+                      ))
                   (charset-name ret)
                   (if (= (charset-iso-graphic-plane ret) 1)
                       (logior (cdr cell)
        (tabify (point-min)(point-max))
        ))))
 
+(defun decode-builtin-char (charset code-point)
+  (if (and (not (eq charset 'ideograph-daikanwa))
+          (or (memq charset '(ascii latin-viscii-upper
+                                    latin-viscii-lower
+                                    arabic-iso8859-6
+                                    japanese-jisx0213-1
+                                    japanese-jisx0213-2))
+              (= (char-int (charset-iso-final-char charset)) 0)))
+      (decode-char charset code-point)
+    (let ((table (charset-mapping-table charset)))
+      (if table
+         (prog2
+             (set-charset-mapping-table charset nil)
+             (decode-char charset code-point)
+           (set-charset-mapping-table charset table))
+       (decode-char charset code-point)))))
+
 ;;;###autoload
 (defun char-db-update-comment ()
   (interactive)