X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Futf-2000%2Fchar-db-util.el;h=5e7b76fe2b671acaa9e250ab730d2d129c1cee96;hb=d443d8d3ebaddf96e67d47841583087402cabf34;hp=cb4e9e051b094b5c352ffe538c04598f6f290064;hpb=8d23a584a95cbbdb04aee281ecc82fac1c9305d1;p=chise%2Fxemacs-chise.git- diff --git a/lisp/utf-2000/char-db-util.el b/lisp/utf-2000/char-db-util.el index cb4e9e0..5e7b76f 100644 --- a/lisp/utf-2000/char-db-util.el +++ b/lisp/utf-2000/char-db-util.el @@ -61,6 +61,16 @@ ("So" symbol other) )) +(defconst ideographic-radicals + (let ((v (make-vector 215 nil)) + (i 1)) + (while (< i 215) + (aset v i (int-char (+ #x2EFF i))) + (setq i (1+ i))) + (if (< (charset-iso-final-char (car (split-char (aref v 34)))) ?0) + (aset v 34 (make-char 'chinese-gb2312 #x62 #x3A))) + v)) + (defun char-attribute-name< (ka kb) (cond ((find-charset ka) @@ -176,7 +186,8 @@ cell)) (setq data (del-alist 'mirrored data)) ) - (when (setq cell (assq 'decimal-digit-value data)) + (cond + ((setq cell (assq 'decimal-digit-value data)) (setq cell (cdr cell)) (insert (format "(decimal-digit-value . %S) " @@ -197,13 +208,57 @@ (setq data (del-alist 'numeric-value data)) ) ) - (when (setq cell (assq 'iso-10646-comment data)) + (t + (when (setq cell (assq 'digit-value data)) (setq cell (cdr cell)) - (insert (format "(iso-10646-comment\t. %S) + (insert (format "(digit-value\t. %S) " cell)) - (setq data (del-alist 'iso-10646-comment data)) + (setq data (del-alist 'digit-value data)) ) + (when (setq cell (assq 'numeric-value data)) + (setq cell (cdr cell)) + (insert (format "(numeric-value\t. %S) + " + cell)) + (setq data (del-alist 'numeric-value data)) + ))) + (when (setq cell (assq 'iso-10646-comment data)) + (setq cell (cdr cell)) + (insert (format "(iso-10646-comment\t. %S) + " + cell)) + (setq data (del-alist 'iso-10646-comment data)) + ) + (when (setq cell (assq 'ideographic-radical data)) + (setq cell (cdr cell)) + (insert (format "(ideographic-radical . %S)\t; %c + " + cell + (aref ideographic-radicals cell))) + (setq data (del-alist 'ideographic-radical data)) + ) + (cond + ((setq cell (assq 'ideographic-strokes data)) + (setq cell (cdr cell)) + (insert (format "(ideographic-strokes . %S) + " + cell)) + (setq data (del-alist 'ideographic-strokes data)) + (when (setq cell (assq 'total-strokes data)) + (setq cell (cdr cell)) + (insert (format "(total-strokes\t . %S) + " + cell)) + (setq data (del-alist 'total-strokes data)) + )) + ((setq cell (assq 'total-strokes data)) + (setq cell (cdr cell)) + (insert (format "(total-strokes\t. %S) + " + cell)) + (setq data (del-alist 'total-strokes data)) + )) (when (setq cell (assq '->decomposition data)) (setq cell (cdr cell)) (insert (format "(->decomposition\t%s) @@ -286,10 +341,13 @@ " ) (charset-name ret) - (mapconcat (lambda (b) - (format "#x%02X" b) - ) - (cdr cell) " ")))) + (mapconcat + (lambda (b) + (format "#x%02X" + (if (= (charset-graphic ret) 1) + (logior b #x80) + b))) + (cdr cell) " ")))) ((string-match "^->" (symbol-name (car cell))) (insert (format "(%-18s %s) @@ -304,9 +362,11 @@ (format "\n %S" code)))) (cdr cell) " ")))) ((consp (cdr cell)) - (insert (format "%S + (insert (format "(%-18s %s) " - cell))) + (car cell) + (mapconcat (function prin1-to-string) + (cdr cell) " ")))) (t (insert (format "(%-18s . %S) "