(dump-jef-china3-to-ucs-table): New function.
authortomo <tomo>
Sat, 28 Sep 2002 17:32:19 +0000 (17:32 +0000)
committertomo <tomo>
Sat, 28 Sep 2002 17:32:19 +0000 (17:32 +0000)
dump-tables.el

index 2852a08..7d96563 100644 (file)
          (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)))