From: tomo Date: Sat, 28 Sep 2002 17:32:19 +0000 (+0000) Subject: (dump-jef-china3-to-ucs-table): New function. X-Git-Tag: chise-base-0_23~72 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=45db510a43c50ede254407424c7f608d617d2e2e;p=chise%2Ftomoyo-tools.git (dump-jef-china3-to-ucs-table): New function. --- diff --git a/dump-tables.el b/dump-tables.el index 2852a08..7d96563 100644 --- a/dump-tables.el +++ b/dump-tables.el @@ -193,3 +193,25 @@ (setq cell (1+ cell))) (setq row (1+ row)))) (write-region (point-min)(point-max) filename))) + +(defun dump-jef-china3-to-ucs-table (filename) + (interactive "Fdump JC3-to-UCS : ") + (if (file-directory-p filename) + (setq filename (expand-file-name "JC3-to-UCS.txt" filename))) + (with-temp-buffer + (let ((row #x41) + cell chr ucs) + (while (<= row #x9F) + (setq cell #xA1) + (while (< cell #xFE) + (when (and (setq chr (make-char 'china3-jef row cell)) + (setq ucs (or (get-char-attribute chr 'ucs) + (get-char-attribute chr '=>ucs)))) + (insert (format "JC3-%02X%02X\t" row cell)) + (insert (format (if (<= ucs #xFFFF) + "U+%04X\n" + "U-%08X\n") + ucs))) + (setq cell (1+ cell))) + (setq row (1+ row)))) + (write-region (point-min)(point-max) filename)))