From: MORIOKA Tomohiko Date: Fri, 18 Mar 2016 08:03:56 +0000 (+0900) Subject: (www-format-encode-string): X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=f67ef4e60a2457762c0901880b78c98ae5515150;p=chise%2Fest.git (www-format-encode-string): - Support `=hanziku-{1..12}' and `=big5'. - Display &G-CBddddd; and &g2-CBddddd;. - Display &({o-|G-|g2-}){I|U}+hhhh;. - Display &A-GT-ddddd;. --- diff --git a/cwiki-common.el b/cwiki-common.el index 2579d22..78766fe 100644 --- a/cwiki-common.el +++ b/cwiki-common.el @@ -809,7 +809,6 @@ '(=jef-china3 "JC3-" 4 X) '(=ucs@unicode "UU+" 4 X) '(=ucs@JP/hanazono "hanaJU+" 4 X) - '(=daikanwa "M-" 5 d) '(==cns11643-1 "R-C1-" 4 X) '(==cns11643-2 "R-C2-" 4 X) '(==cns11643-3 "R-C3-" 4 X) @@ -817,11 +816,25 @@ '(==cns11643-5 "R-C5-" 4 X) '(==cns11643-6 "R-C6-" 4 X) '(==cns11643-7 "R-C7-" 4 X) + '(=hanziku-1 "HZK01-" 4 X) + '(=hanziku-2 "HZK02-" 4 X) + '(=hanziku-3 "HZK03-" 4 X) + '(=hanziku-4 "HZK04-" 4 X) + '(=hanziku-5 "HZK05-" 4 X) + '(=hanziku-6 "HZK06-" 4 X) + '(=hanziku-7 "HZK07-" 4 X) + '(=hanziku-8 "HZK08-" 4 X) + '(=hanziku-9 "HZK09-" 4 X) + '(=hanziku-10 "HZK10-" 4 X) + '(=hanziku-11 "HZK11-" 4 X) + '(=hanziku-12 "HZK12-" 4 X) + '(=big5 "B-" 4 X) + '(=daikanwa "M-" 5 d) coded-charset-entity-reference-alist))) (encode-coding-region (point-min)(point-max) 'utf-8-mcs-er) (goto-char (point-min)) - (while (re-search-forward "&\\(A-\\)?CB\\([0-9]+\\);" nil t) + (while (re-search-forward "&\\(A-\\|G-\\|g2-\\)?CB\\([0-9]+\\);" nil t) (setq code (string-to-int (match-string 2))) (replace-match (format "\"CB%05d\"" t 'literal)) (goto-char (point-min)) - (while (re-search-forward "&\\(o-\\|G-\\|g2-\\)?IU-\\([0-9A-F]+\\);" nil t) + (while (re-search-forward "&\\(o-\\|G-\\|g2-\\)?IU[+-]\\([0-9A-F]+\\);" nil t) (setq code (string-to-int (match-string 2) 16)) (replace-match (format "\"u%04x\"" t 'literal)) (goto-char (point-min)) - (while (re-search-forward "&\\(G-\\|R-\\|g2-\\)?GT-\\([0-9]+\\);" nil t) + (while (re-search-forward "&\\(A-\\|G-\\|R-\\|g2-\\)?GT-\\([0-9]+\\);" nil t) (setq code (string-to-int (match-string 2))) (replace-match (format "\"GT-%05d\"" t 'literal)) (goto-char (point-min)) + (while (re-search-forward + "&\\(I-\\)?HZK\\(0[1-9]\\|1[0-2]\\)-\\([0-9A-F]+\\);" nil t) + (setq plane (match-string 2) + code (string-to-int (match-string 3) 16)) + (replace-match + (format "\"HZK%s-%04X\"" + plane + code + chise-wiki-glyph-cgi-url + plane + code + www-format-char-img-style) + t 'literal)) + + (goto-char (point-min)) (while (re-search-forward "&RUI6-\\([0-9A-F]+\\);" nil t) (setq code (string-to-int (match-string 1) 16)) (replace-match