From 45db510a43c50ede254407424c7f608d617d2e2e Mon Sep 17 00:00:00 2001 From: tomo Date: Sat, 28 Sep 2002 17:32:19 +0000 Subject: [PATCH] (dump-jef-china3-to-ucs-table): New function. --- dump-tables.el | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) 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))) -- 1.7.10.4