X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Futf-2000%2Fchar-db-util.el;h=2a0f888579c9505847281964e14ea58a1ceab0b3;hb=a01d05ff63a5b43c05b89f2ab1449f9a8594eed2;hp=642813b32bdeb5f8e369f4f45c0679d5e5362b7b;hpb=db67eb766a1b947c4bbc4d37e65a804e2960e009;p=chise%2Fxemacs-chise.git diff --git a/lisp/utf-2000/char-db-util.el b/lisp/utf-2000/char-db-util.el index 642813b..2a0f888 100644 --- a/lisp/utf-2000/char-db-util.el +++ b/lisp/utf-2000/char-db-util.el @@ -1,7 +1,7 @@ ;;; char-db-util.el --- Character Database utility -*- coding: utf-8-er; -*- ;; Copyright (C) 1998,1999,2000,2001,2002,2003,2004,2005,2006,2007, -;; 2008,2009,2010,2011,2012,2013,2014,2015 MORIOKA Tomohiko. +;; 2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018 MORIOKA Tomohiko. ;; Author: MORIOKA Tomohiko ;; Keywords: CHISE, Character Database, ISO/IEC 10646, UCS, Unicode, MULE. @@ -68,17 +68,17 @@ ?屮 ?艸 ?蓐 ?茻 ?小 ?八 ?釆 ?半 ?牛 ?犛 ; 020 ?告 ?口 ?凵 ?吅 ?哭 ?走 ?止 ?癶 ?步 ?此 ; 030 ?正 ?是 ?辵 ?彳 ?廴 ?㢟 ?行 ?齒 ?牙 ?足 ; 040 - ?疋 ?品 ?龠 ?冊 ?㗊 ?舌 ?干 ?谷 ?只 ?㕯 ; 050 + ?疋 ?品 ?龠 ?冊 ?㗊 ?舌 ?干 ?𧮫 ?只 ?㕯 ; 050 ?句 ?丩 ?古 ?十 ?卅 ?言 ?誩 ?音 ?䇂 ?丵 ; 060 - ?菐 ?𠬞 ?𠬜 ?共 ?異 ?舁 ?𦥑 ?䢅 ?爨 ?革 ; 070 - ?鬲 ?䰜 ?爪 ?𠃨 ?鬥 ?又 ?𠂇 ?㕜 ?支 ?𦘒 ; 080 + ?菐 ?廾 ?𠬜 ?共 ?異 ?舁 ?𦥑 ?䢅 ?爨 ?革 ; 070 + ?鬲 ?䰜 ?爪 ?𠃨 ?鬥 ?又 ?𠂇 ?史 ?支 ?𦘒 ; 080 ?聿 ?畫 ?隶 ?臤 ?臣 ?殳 ?殺 ?𠘧 ?寸 ?皮 ; 090 ?㼱 ?攴 ?敎 ?卜 ?用 ?爻 ?㸚 ?𥄎 ?目 ?䀠 ; 100 ?眉 ?盾 ?自 ?白 ?鼻 ?皕 ?習 ?羽 ?隹 ?奞 ; 110 - ?萑 ?𦫳 ?苜 ?羊 ?羴 ?瞿 ?雔 ?雥 ?鳥 ?烏 ; 120 + ?雈 ?𦫳 ?𥄕 ?羊 ?羴 ?瞿 ?雔 ?雥 ?鳥 ?烏 ; 120 ?𠦒 ?冓 ?幺 ?𢆶 ?叀 ?玄 ?予 ?放 ?𠬪 ?𣦼 ; 130 - ?歺 ?死 ?冎 ?骨 ?肉 ?筋 ?刀 ?刃 ?㓞 ?丰 ; 140 - ?耒 ?𧢲 ?竹 ?箕 ?丌 ?左 ?工 ?㠭 ?巫 ?甘 ; 150 + ?歺 ?死 ?冎 ?骨 ?肉 ?筋 ?刀 ?刃 ?㓞 ?丯 ; 140 + ?耒 ?角 ?竹 ?箕 ?丌 ?左 ?工 ?㠭 ?巫 ?甘 ; 150 ?曰 ?乃 ?丂 ?可 ?兮 ?号 ?亏 ?旨 ?喜 ?壴 ; 160 ; ?旨 ?曰 ?乃 ?丂 ?可 ?兮 ?号 ?亏 ?喜 ?壴 ; 160 ?鼓 ?豈 ?豆 ?豊 ?豐 ?䖒 ?虍 ?虎 ?虤 ?皿 ; 170 @@ -89,10 +89,10 @@ ?之 ?帀 ?出 ?𣎵 ?生 ?乇 ?𠂹 ?𠌶 ?華 ?𥝌 ; 220 ?稽 ?巢 ?桼 ?束 ?㯻 ?囗 ?員 ?貝 ?邑 ?𨛜 ; 230 ?日 ?旦 ?倝 ?㫃 ?冥 ?晶 ?月 ?有 ?明 ?囧 ; 240 - ?夕 ?多 ?毌 ?𢎘 ?𣐺 ?卣 ?齊 ?朿 ?片 ?鼎 ; 250 + ?夕 ?多 ?毌 ?𢎘 ?𣐺 ?𠧪 ?齊 ?朿 ?片 ?鼎 ; 250 ?克 ?彔 ?禾 ?秝 ?黍 ?香 ?米 ?毇 ?臼 ?凶 ; 260 - ?𣎳 ?林 ?麻 ?尗 ?耑 ?韭 ?瓜 ?瓠 ?宀 ?宮 ; 270 - ?呂 ?穴 ?㝱 ?𤕫 ?冖 ?𠔼 ?冃 ?㒳 ?网 ?襾 ; 280 + ?𣎳 ?𣏟 ?麻 ?尗 ?耑 ?韭 ?瓜 ?瓠 ?宀 ?宮 ; 270 + ?呂 ?穴 ?㝱 ?疒 ?冖 ?𠔼 ?冃 ?㒳 ?网 ?襾 ; 280 ?巾 ?巿 ?帛 ?白 ?㡀 ?黹 ?人 ?𠤎 ?匕 ?从 ; 290 ?比 ?北 ?丘 ?㐺 ?𡈼 ?重 ?臥 ?身 ?㐆 ?衣 ; 300 ?裘 ?老 ?毛 ?毳 ?尸 ?尺 ?尾 ?履 ?舟 ?方 ; 310 @@ -104,6 +104,7 @@ ?而 ?豕 ?㣇 ?彑 ?豚 ?豸 ?𤉡 ?易 ?象 ?馬 ; 370 ?𢊁 ?鹿 ?麤 ?㲋 ?兔 ?萈 ?犬 ?㹜 ?鼠 ?能 ; 380 ?熊 ?火 ?炎 ?黑 ?囪 ?焱 ?炙 ?赤 ?大 ?亦 ; 390 + ?夨 ?夭 ?交 ?尣 ?壺 ?壹 ?㚔 ?奢 ?亢 ?夲 ; 400 ]) (defun shuowen-radical (number) @@ -168,6 +169,7 @@ =hanyo-denshi/hg =hanyo-denshi/jt =hanyo-denshi/ks + =hanyo-denshi/tk ;; ==mj ;; ==adobe-japan1-0 ;; ==adobe-japan1-1 @@ -179,14 +181,17 @@ ==jis-x0208 ==jis-x0213-1 ==jis-x0213-2 + ==jis-x0212 ==hanyo-denshi/ja ==hanyo-denshi/jb ==hanyo-denshi/jc ==hanyo-denshi/ft + ==hanyo-denshi/ia ==hanyo-denshi/ib ==hanyo-denshi/hg ==hanyo-denshi/jt ==hanyo-denshi/ks + ==hanyo-denshi/tk =gt =gt-k =daikanwa @@ -264,7 +269,7 @@ =>jis-x0213-2 ==>ucs@bucs =>iwds-1 - =>ucs@hanyo-denshi + ;; =>ucs@hanyo-denshi =>ucs@iso =>ucs@unicode =>ucs@jis @@ -307,7 +312,9 @@ =>>big5-cdp =>>gt-k =+>gt + =+>big5-cdp =>gt + =>mj =>big5-cdp =>daikanwa =>daikanwa/ho @@ -324,10 +331,54 @@ =jef-china3 =>cbeta =shinjigen + =ucs-var-001 + =ucs-var-002 + =ucs-var-003 + =ucs-var-004 + =ucs-var-005 + =ucs-var-006 + =ucs-var-008 + =ucs-var-010 + =ucs-itaiji-001 =ucs-itaiji-002 - =big5-cdp-var-3 - =big5-cdp-var-5 - =>ucs@iwds-1)) + =ucs-itaiji-003 + =ucs-itaiji-004 + =ucs-itaiji-005 + =ucs-itaiji-006 + =ucs-itaiji-007 + =ucs-itaiji-008 + =ucs-itaiji-009 + =ucs-itaiji-010 + =ucs-itaiji-011 + =>ucs-itaiji-001 + =>ucs-itaiji-002 + =>ucs-itaiji-003 + =>ucs-itaiji-004 + =>ucs-itaiji-005 + =>ucs-itaiji-006 + =>ucs-itaiji-007 + =>ucs-itaiji-009 + =big5-cdp-var-001 + =big5-cdp-var-002 + =big5-cdp-var-003 + =big5-cdp-var-004 + =big5-cdp-var-005 + =big5-cdp-var-010 + =big5-cdp-itaiji-001 + =big5-cdp-itaiji-002 + =big5-cdp-itaiji-003 + =>big5-cdp-itaiji-001 + =>ucs@iwds-1 + =>ucs@cognate + =>ucs@component + =>ucs-itaiji-001@iwds-1 + =>big5-cdp@iwds-1 + =>big5-cdp@component + =>big5-cdp@cognate + ==ucs@gb + =ucs@gb + ==ucs-var-002 + =ucs@JP/hanazono)) ;;; @ char-db formatters @@ -431,7 +482,8 @@ ;; =gt-k =jis-x0208@1997 )) - (eq (charset-property ccs 'iso-ir) 177) + (and (eq (charset-property ccs 'iso-ir) 177) + (not (eq (charset-name ccs) '=ucs@big5))) ;; (string-match "=ucs@" (symbol-name ccs)) ) (setq ccs (charset-name ccs)) @@ -695,7 +747,8 @@ ===hng-okd ===hng-wad ===hng-kmi ===hng-zkd ===hng-doh ===hng-jyu ===hng-tzs ===hng-kss ===hng-kyo - ===hng-smk)) + ===hng-smk + =shuowen-jiguge ===shuowen-jiguge4 ===shuowen-jiguge5)) ;; (string-match "^=adobe-" (symbol-name name)) ) "(%-18s . %05d)\t; %c") @@ -703,9 +756,11 @@ ==hanyo-denshi/ks ===hanyo-denshi/ks =>>hanyo-denshi/ks =koseki ==koseki - =mj ==mj ===mj =>>mj + =mj ==mj ===mj =>>mj =>mj =zihai mojikyo)) "(%-18s . %06d)\t; %c") + ((memq name '(=hanyo-denshi/tk ==hanyo-denshi/tk)) + "(%-18s . %08d)\t; %c") ((>= (charset-dimension name) 2) "(%-18s . #x%04X)\t; %c") (t @@ -1135,17 +1190,17 @@ (setq strokes value))) (setq attributes (delq 'kangxi-strokes attributes)) ) - (when (and (memq 'japanese-radical attributes) - (setq value (get-char-attribute char 'japanese-radical))) - (unless (eq value radical) - (insert (format "(japanese-radical\t . %S)\t; %c%s" - value - (ideographic-radical value) - line-breaking)) - (or radical - (setq radical value))) - (setq attributes (delq 'japanese-radical attributes)) - ) + ;; (when (and (memq 'japanese-radical attributes) + ;; (setq value (get-char-attribute char 'japanese-radical))) + ;; (unless (eq value radical) + ;; (insert (format "(japanese-radical\t . %S)\t; %c%s" + ;; value + ;; (ideographic-radical value) + ;; line-breaking)) + ;; (or radical + ;; (setq radical value))) + ;; (setq attributes (delq 'japanese-radical attributes)) + ;; ) (when (and (memq 'japanese-strokes attributes) (setq value (get-char-attribute char 'japanese-strokes))) (unless (eq value strokes) @@ -1185,38 +1240,38 @@ ;; (setq radical value))) ;; (setq attributes (delq 'shinjigen-1-radical attributes)) ;; ) - (when (and (memq 'ideographic- attributes) - (setq value (get-char-attribute char 'ideographic-))) - (insert "(ideographic- ") - (setq lbs (concat "\n" (make-string (current-column) ?\ )) - separator nil) - (while (consp value) - (setq cell (car value)) - (if (integerp cell) - (setq cell (decode-char '=ucs cell))) - (cond ((characterp cell) - (if separator - (insert lbs)) - (if readable - (insert (format "%S" cell)) - (char-db-insert-char-spec cell readable)) - (setq separator lbs)) - ((consp cell) - (if separator - (insert lbs)) - (if (consp (car cell)) - (char-db-insert-char-spec cell readable) - (char-db-insert-char-reference cell readable)) - (setq separator lbs)) - (t - (if separator - (insert separator)) - (insert (prin1-to-string cell)) - (setq separator " "))) - (setq value (cdr value))) - (insert ")") - (insert line-breaking) - (setq attributes (delq 'ideographic- attributes))) + ;; (when (and (memq 'ideographic- attributes) + ;; (setq value (get-char-attribute char 'ideographic-))) + ;; (insert "(ideographic- ") + ;; (setq lbs (concat "\n" (make-string (current-column) ?\ )) + ;; separator nil) + ;; (while (consp value) + ;; (setq cell (car value)) + ;; (if (integerp cell) + ;; (setq cell (decode-char '=ucs cell))) + ;; (cond ((characterp cell) + ;; (if separator + ;; (insert lbs)) + ;; (if readable + ;; (insert (format "%S" cell)) + ;; (char-db-insert-char-spec cell readable)) + ;; (setq separator lbs)) + ;; ((consp cell) + ;; (if separator + ;; (insert lbs)) + ;; (if (consp (car cell)) + ;; (char-db-insert-char-spec cell readable) + ;; (char-db-insert-char-reference cell readable)) + ;; (setq separator lbs)) + ;; (t + ;; (if separator + ;; (insert separator)) + ;; (insert (prin1-to-string cell)) + ;; (setq separator " "))) + ;; (setq value (cdr value))) + ;; (insert ")") + ;; (insert line-breaking) + ;; (setq attributes (delq 'ideographic- attributes))) (when (and (memq 'total-strokes attributes) (setq value (get-char-attribute char 'total-strokes))) (insert (format "(total-strokes . %S)%s" @@ -1224,21 +1279,21 @@ line-breaking)) (setq attributes (delq 'total-strokes attributes)) ) - (when (and (memq '->ideograph attributes) - (setq value (get-char-attribute char '->ideograph))) - (insert (format "(->ideograph\t%s)%s" - (mapconcat (lambda (code) - (cond ((symbolp code) - (symbol-name code)) - ((integerp code) - (format "#x%04X" code)) - (t - (format "%s %S" - line-breaking code)))) - value " ") - line-breaking)) - (setq attributes (delq '->ideograph attributes)) - ) + ;; (when (and (memq '->ideograph attributes) + ;; (setq value (get-char-attribute char '->ideograph))) + ;; (insert (format "(->ideograph\t%s)%s" + ;; (mapconcat (lambda (code) + ;; (cond ((symbolp code) + ;; (symbol-name code)) + ;; ((integerp code) + ;; (format "#x%04X" code)) + ;; (t + ;; (format "%s %S" + ;; line-breaking code)))) + ;; value " ") + ;; line-breaking)) + ;; (setq attributes (delq '->ideograph attributes)) + ;; ) ;; (when (and (memq '->decomposition attributes) ;; (setq value (get-char-attribute char '->decomposition))) ;; (insert (format "(->decomposition\t%s)%s" @@ -1269,24 +1324,24 @@ line-breaking)) (setq attributes (delq '->mojikyo attributes)) ) - (when (and (memq 'hanyu-dazidian-vol attributes) - (setq value (get-char-attribute char 'hanyu-dazidian-vol))) - (insert (format "(hanyu-dazidian-vol . %d)%s" - value line-breaking)) - (setq attributes (delq 'hanyu-dazidian-vol attributes)) - ) - (when (and (memq 'hanyu-dazidian-page attributes) - (setq value (get-char-attribute char 'hanyu-dazidian-page))) - (insert (format "(hanyu-dazidian-page . %d)%s" - value line-breaking)) - (setq attributes (delq 'hanyu-dazidian-page attributes)) - ) - (when (and (memq 'hanyu-dazidian-char attributes) - (setq value (get-char-attribute char 'hanyu-dazidian-char))) - (insert (format "(hanyu-dazidian-char . %d)%s" - value line-breaking)) - (setq attributes (delq 'hanyu-dazidian-char attributes)) - ) + ;; (when (and (memq 'hanyu-dazidian-vol attributes) + ;; (setq value (get-char-attribute char 'hanyu-dazidian-vol))) + ;; (insert (format "(hanyu-dazidian-vol . %d)%s" + ;; value line-breaking)) + ;; (setq attributes (delq 'hanyu-dazidian-vol attributes)) + ;; ) + ;; (when (and (memq 'hanyu-dazidian-page attributes) + ;; (setq value (get-char-attribute char 'hanyu-dazidian-page))) + ;; (insert (format "(hanyu-dazidian-page . %d)%s" + ;; value line-breaking)) + ;; (setq attributes (delq 'hanyu-dazidian-page attributes)) + ;; ) + ;; (when (and (memq 'hanyu-dazidian-char attributes) + ;; (setq value (get-char-attribute char 'hanyu-dazidian-char))) + ;; (insert (format "(hanyu-dazidian-char . %d)%s" + ;; value line-breaking)) + ;; (setq attributes (delq 'hanyu-dazidian-char attributes)) + ;; ) (unless readable (dolist (ignored '(composition ->denotational <-subsumptive ->ucs-unified @@ -1350,7 +1405,7 @@ ) ((or (eq name 'ideographic-structure) (eq name 'ideographic-combination) - (eq name 'ideographic-) + ;; (eq name 'ideographic-) (eq name '=decomposition) (char-feature-base-name= '=decomposition name) (char-feature-base-name= '=>decomposition name) @@ -1363,34 +1418,34 @@ (char-db-insert-relation-feature char name value line-breaking ccss readable)) - ((memq name '(ideograph= - original-ideograph-of - ancient-ideograph-of - vulgar-ideograph-of - wrong-ideograph-of - ;; simplified-ideograph-of - ideographic-variants - ;; ideographic-different-form-of - )) - (insert (format "(%-18s%s " name line-breaking)) - (setq lbs (concat "\n" (make-string (current-column) ?\ )) - separator nil) - (while (consp value) - (setq cell (car value)) - (if (and (consp cell) - (consp (car cell))) - (progn - (if separator - (insert lbs)) - (char-db-insert-alist cell readable) - (setq separator lbs)) - (if separator - (insert separator)) - (insert (prin1-to-string cell)) - (setq separator " ")) - (setq value (cdr value))) - (insert ")") - (insert line-breaking)) + ;; ((memq name '(ideograph= + ;; original-ideograph-of + ;; ancient-ideograph-of + ;; vulgar-ideograph-of + ;; wrong-ideograph-of + ;; ;; simplified-ideograph-of + ;; ideographic-variants + ;; ;; ideographic-different-form-of + ;; )) + ;; (insert (format "(%-18s%s " name line-breaking)) + ;; (setq lbs (concat "\n" (make-string (current-column) ?\ )) + ;; separator nil) + ;; (while (consp value) + ;; (setq cell (car value)) + ;; (if (and (consp cell) + ;; (consp (car cell))) + ;; (progn + ;; (if separator + ;; (insert lbs)) + ;; (char-db-insert-alist cell readable) + ;; (setq separator lbs)) + ;; (if separator + ;; (insert separator)) + ;; (insert (prin1-to-string cell)) + ;; (setq separator " ")) + ;; (setq value (cdr value))) + ;; (insert ")") + ;; (insert line-breaking)) ((consp value) (insert (format "(%-18s " name)) (setq lbs (concat "\n" (make-string (current-column) ?\ ))