;;; 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 <tomo@kanji.zinbun.kyoto-u.ac.jp>
;; Keywords: Ideographs, Character Database, CHISE, UCS, Unicode
(#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")
;;;###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)
(unless (char-ucs char)
(insert-char-data char)))
nil)
- '->decomposition)
+ '=decomposition)
(write-region (point-min)(point-max)
(expand-file-name
"additional-precomposed.el" directory)))))
(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))