X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=ids-read.el;h=16937630b26531cdaaa2ae231aa86bc736302f1f;hb=42572ba362715cc5f44028cfd1d070f69e4fa6d7;hp=581a8f3d58cb7d95a7c1ee50f2820d55bd4381e7;hpb=b25a0c92d62ae2d8d34ff26de48de85971f04459;p=chise%2Fids.git diff --git a/ids-read.el b/ids-read.el index 581a8f3..1693763 100644 --- a/ids-read.el +++ b/ids-read.el @@ -1,6 +1,6 @@ ;;; ids-read.el --- Reader for IDS-* files -;; Copyright (C) 2002, 2003, 2004, 2020 MORIOKA Tomohiko +;; Copyright (C) 2002, 2003, 2004, 2020, 2021 MORIOKA Tomohiko ;; Author: MORIOKA Tomohiko ;; Keywords: IDS, IDC, Ideographs, UCS, Unicode @@ -108,27 +108,30 @@ ((string-match "CB\\([0-9]+\\)" chs) (decode-char 'ideograph-cbeta (string-to-int (match-string 1 chs)))) + ((string-match "SW-JIGUGE-\\([0-9]+\\)" chs) + (decode-char '=shuowen-jiguge + (string-to-int (match-string 1 chs)))) )) - (when (and char - (>= (length ids) 3) - (not (string-match "\\?" ids)) - (consp (setq structure (ids-parse-string ids simplify)))) - (when (or (not soft) - (null - (get-char-attribute char 'ideographic-structure))) - (put-char-attribute char - 'ideographic-structure - (cdr (car structure)))) - (when (and u-char - (not (eq char u-char)) - (or (not soft) - (null - (get-char-attribute - u-char 'ideographic-structure)))) - (put-char-attribute - u-char 'ideographic-structure - (ideographic-structure-convert-to-domain - (cdr (car structure)) 'unicode))) + (when char + (when (and (>= (length ids) 3) + (not (string-match "\\?" ids)) + (consp (setq structure (ids-parse-string ids simplify)))) + (when (or (not soft) + (null + (get-char-attribute char 'ideographic-structure))) + (put-char-attribute char + 'ideographic-structure + (cdr (car structure)))) + (when (and u-char + (not (eq char u-char)) + (or (not soft) + (null + (get-char-attribute + u-char 'ideographic-structure)))) + (put-char-attribute + u-char 'ideographic-structure + (ideographic-structure-convert-to-domain + (cdr (car structure)) 'unicode)))) (when (and (>= (length apparent-ids) 3) (consp (setq structure (ids-parse-string apparent-ids simplify))))