X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=char-db-dump.el;h=2f717afb063544cc7e0ad989b524fe997e9200fc;hb=9a775b981ae6745abd51bf2668da12b8eaae7b42;hp=b271cbf756f946b0cabb7a5444cca6db2ed1ab51;hpb=78d11bee30fd4c641494ef8c67529cc6a5192c80;p=chise%2Ftomoyo-tools.git diff --git a/char-db-dump.el b/char-db-dump.el index b271cbf..2f717af 100644 --- a/char-db-dump.el +++ b/char-db-dump.el @@ -1,6 +1,6 @@ ;;; char-db-dump.el --- Dump utility of char-spec files -;; Copyright (C) 2002,2003,2004 MORIOKA Tomohiko +;; Copyright (C) 2002,2003,2004,2005,2010,2018 MORIOKA Tomohiko ;; Author: MORIOKA Tomohiko ;; Keywords: Ideographs, Character Database, CHISE, UCS, Unicode @@ -108,6 +108,7 @@ (#x3130 #x318F "u03130-Hangul-Compatibility-Jamo.el") (#x3190 #x319F "u03190-Kanbun.el") (#x31A0 #x31BF "u031A0-Bopomofo-Extended.el") + (#x31C0 #x31EF "u031C0-CJK-Strokes.el") (#x31F0 #x31FF "u031F0-Katakana-Phonetic-Extensions.el") (#x3200 #x32FF "u03200-Enclosed-CJK-Letters-and-Months.el") (#x3300 #x33FF "u03300-CJK-Compatibility.el") @@ -138,6 +139,41 @@ ;;;###autoload +(defun char-db-dump-oracle-bones (directory) + (interactive "DDump Oracle-Bones : ") + (let ((coding-system-for-write char-db-file-coding-system) + (code 1) + chr a-chr) + (with-temp-buffer + (insert (format ";; -*- coding: %s -*-\n" + char-db-file-coding-system)) + (while (<= code 8192) + (when (setq chr (decode-char '=zinbun-oracle code 'defined-only)) + (setq a-chr (decode-char '=>zinbun-oracle code 'defined-only)) + (unless (eq a-chr chr) + (insert-char-data a-chr)) + (insert-char-data chr)) + (setq code (1+ code))) + (write-region (point-min)(point-max) + (expand-file-name "Oracle-Bones.el" directory))))) + +;;;###autoload +(defun char-db-dump-shuowen (directory) + (interactive "DDump Shuowen : ") + (let ((coding-system-for-write char-db-file-coding-system) + (code 1) + chr) + (with-temp-buffer + (insert (format ";; -*- coding: %s -*-\n" + char-db-file-coding-system)) + (while (<= code 52101) + (when (setq chr (decode-char '=shuowen-jiguge code 'defined-only)) + (insert-char-data-with-variant chr)) + (setq code (1+ code))) + (write-region (point-min)(point-max) + (expand-file-name "ShuoWen.el" directory))))) + +;;;###autoload (defun char-db-dump-ruimoku6 (directory) (interactive "DDump ruimoku6 : ") (let ((coding-system-for-write char-db-file-coding-system) @@ -166,7 +202,7 @@ (unless (char-ucs char) (insert-char-data char))) nil) - '->decomposition) + '=decomposition) (write-region (point-min)(point-max) (expand-file-name "additional-precomposed.el" directory))))) @@ -177,6 +213,8 @@ (interactive "DDirectory to dump : ") (char-db-dump-ideographs directory) (char-db-dump-non-ideographs directory) + (char-db-dump-oracle-bones directory) + (char-db-dump-shuowen directory) (char-db-dump-ruimoku6 directory) (char-db-dump-additional-precomposed directory))