X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Futf-2000%2Fchar-db-util.el;h=acbc639538ec1e6bb026e57553f03905ba922d5f;hb=e40ab1bdc7396453aef3a93c748aaf58d2c6f4e3;hp=a7f4e371d35c24c90873186673f0d973354462b3;hpb=f9cf8ab120361d21ffa5d2319f02cc26d55b1121;p=chise%2Fxemacs-chise.git- diff --git a/lisp/utf-2000/char-db-util.el b/lisp/utf-2000/char-db-util.el index a7f4e37..acbc639 100644 --- a/lisp/utf-2000/char-db-util.el +++ b/lisp/utf-2000/char-db-util.el @@ -153,9 +153,9 @@ ) (when (setq cell (assq '->ucs data)) (setq cell (cdr cell)) - (insert (format "(->ucs\t\t. #x%04X) + (insert (format "(->ucs\t\t. #x%04X)\t; %c " - cell)) + cell (decode-char 'ucs cell))) (setq data (del-alist '->ucs data)) ) (when (setq cell (assq 'general-category data)) @@ -397,11 +397,18 @@ (insert (format (if has-long-ccs-name - "(%-26s . %X) + (if (eq ret (find-charset 'ideograph-daikanwa)) + "(%-26s . %05d)\t; %c + " + "(%-26s . #x%X)\t; %c " - "(%-18s . %X) + ) + (if (eq ret (find-charset 'ideograph-daikanwa)) + "(%-18s . %05d)\t; %c " - ) + "(%-18s . #x%X)\t; %c + " + )) (charset-name ret) (if (= (charset-iso-graphic-plane ret) 1) (logior (cdr cell) @@ -412,7 +419,8 @@ ((= (charset-dimension ret) 3) #x808080) (t 0))) - (cdr cell))))) + (cdr cell)) + (decode-builtin-char ret (cdr cell))))) ((string-match "^->" (symbol-name (car cell))) (insert (format "(%-18s %s) @@ -446,6 +454,25 @@ (tabify (point-min)(point-max)) )))) +(defun decode-builtin-char (charset code-point) + (setq charset (get-charset charset)) + (if (and (not (eq (charset-name charset) 'ideograph-daikanwa)) + (or (memq (charset-name 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) @@ -502,9 +529,10 @@ ))) (defun write-char-range-data-to-file (min max file) - (with-temp-buffer - (insert-char-range-data min max) - (write-region (point-min)(point-max) file))) + (let ((coding-system-for-write 'utf-8)) + (with-temp-buffer + (insert-char-range-data min max) + (write-region (point-min)(point-max) file)))) (defvar what-character-original-window-configuration) @@ -522,7 +550,7 @@ (condition-case err (progn (insert-char-data-with-variant char) - (char-db-update-comment) + ;; (char-db-update-comment) (set-buffer-modified-p nil) (view-mode the-buf (lambda (buf) (set-window-configuration