From: MORIOKA Tomohiko Date: Fri, 21 Nov 2014 03:14:09 +0000 (+0900) Subject: (www-uri-decode-feature-name): X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bc975ab6d895609519ec863ed5b21bf30a8e715e;p=chise%2Fest.git (www-uri-decode-feature-name): - Decode repi.FOO to ===FOO. - Decode rep2.FOO to ===FOO instead of ==FOO. - Decode g2.FOO to ==FOO. - Decode gi.FOO to ==FOO instead of =>>>FOO. (www-uri-encode-feature-name): - Encode ==FOO to g2.FOO instead of rep2.FOO. - Encode ===FOO to repi.FOO. (www-format-encode-string): Add setting for `=>>hanyo-denshi/*' and `==hanyo-denshi/*'; support some ===FOO and ==FOO. (coded-charset-GlyphWiki-id-alist): Add `==adobe-japan1-*', `===adobe-japan1-*', `==ucs@jis', `===ucs@jis', `==ucs@cns', `==daikanwa', `===daikanwa', `==ucs@ks' and `===ucs@ks'. (char-GlyphWiki-id): Treat `=jis-x0213-2' as uXXXX. --- diff --git a/cwiki-common.el b/cwiki-common.el index f8f840c..ed51c57 100644 --- a/cwiki-common.el +++ b/cwiki-common.el @@ -359,8 +359,8 @@ (est-uri-decode-feature-name-body (substring uri-feature (match-end 0))))) ) - ((string-match "^rep2\\." uri-feature) - (intern (format "==%s" + ((string-match "^rep[2i]\\." uri-feature) + (intern (format "===%s" (est-uri-decode-feature-name-body (substring uri-feature (match-end 0))))) ) @@ -369,8 +369,8 @@ (est-uri-decode-feature-name-body (substring uri-feature (match-end 0))))) ) - ((string-match "^gi\\." uri-feature) - (intern (format "=>>>%s" + ((string-match "^g[i2]\\." uri-feature) + (intern (format "==%s" (est-uri-decode-feature-name-body (substring uri-feature (match-end 0))))) ) @@ -429,7 +429,12 @@ (substring feature-name (match-beginning 1)))) ) ((string-match "^==\\([^=>]+\\)" feature-name) - (concat "rep2." + (concat "g2." + (est-uri-encode-feature-name-body + (substring feature-name (match-beginning 1)))) + ) + ((string-match "^===\\([^=>]+\\)" feature-name) + (concat "repi." (est-uri-encode-feature-name-body (substring feature-name (match-beginning 1)))) ) @@ -741,6 +746,28 @@ '(=hanyo-denshi/ip "HD-IP-" 4 X) '(=hanyo-denshi/jt "HD-JT-" 4 X) '(=hanyo-denshi/ks "HD-KS-" 6 d) + '(=>>hanyo-denshi/ja "G-HD-JA-" 4 X) + '(=>>hanyo-denshi/jb "G-HD-JB-" 4 X) + '(=>>hanyo-denshi/jc "G-HD-JC-" 4 X) + '(=>>hanyo-denshi/jd "G-HD-JD-" 4 X) + '(=>>hanyo-denshi/ft "G-HD-FT-" 4 X) + '(=>>hanyo-denshi/ia "G-HD-IA-" 4 X) + '(=>>hanyo-denshi/ib "G-HD-IB-" 4 X) + '(=>>hanyo-denshi/hg "G-HD-HG-" 4 X) + '(=>>hanyo-denshi/ip "G-HD-IP-" 4 X) + '(=>>hanyo-denshi/jt "G-HD-JT-" 4 X) + '(=>>hanyo-denshi/ks "G-HD-KS-" 6 d) + '(==hanyo-denshi/ja "g2-HD-JA-" 4 X) + '(==hanyo-denshi/jb "g2-HD-JB-" 4 X) + '(==hanyo-denshi/jc "g2-HD-JC-" 4 X) + '(==hanyo-denshi/jd "g2-HD-JD-" 4 X) + '(==hanyo-denshi/ft "g2-HD-FT-" 4 X) + '(==hanyo-denshi/ia "g2-HD-IA-" 4 X) + '(==hanyo-denshi/ib "g2-HD-IB-" 4 X) + '(==hanyo-denshi/hg "g2-HD-HG-" 4 X) + '(==hanyo-denshi/ip "g2-HD-IP-" 4 X) + '(==hanyo-denshi/jt "g2-HD-JT-" 4 X) + '(==hanyo-denshi/ks "g2-HD-KS-" 6 d) '(=cns11643-1 "C1-" 4 X) '(=cns11643-2 "C2-" 4 X) '(=cns11643-3 "C3-" 4 X) @@ -787,7 +814,7 @@ style=\"%s\">" t 'literal)) (goto-char (point-min)) - (while (re-search-forward "&\\(o-\\|G-\\|g2-\\)?J\\(78\\|83\\|90\\|97\\|SP\\)-\\([0-9A-F][0-9A-F][0-9A-F][0-9A-F]\\);" nil t) + (while (re-search-forward "&\\(o-\\|G-\\|g2-\\|R-\\)?J\\(78\\|83\\|90\\|97\\|SP\\)-\\([0-9A-F][0-9A-F][0-9A-F][0-9A-F]\\);" nil t) (setq plane (match-string 2) code (string-to-int (match-string 3) 16)) (replace-match @@ -802,7 +829,7 @@ style=\"%s\">" t 'literal)) (goto-char (point-min)) - (while (re-search-forward "&\\(o-\\)?HD-\\(JA\\|JB\\|JC\\|JD\\|FT\\|IA\\|IB\\|HG\\)-\\([0-9A-F][0-9A-F][0-9A-F][0-9A-F]\\);" nil t) + (while (re-search-forward "&\\(o-\\|G-\\|g2-\\)?HD-\\(JA\\|JB\\|JC\\|JD\\|FT\\|IA\\|IB\\|HG\\)-\\([0-9A-F][0-9A-F][0-9A-F][0-9A-F]\\);" nil t) (setq plane (match-string 2) code (string-to-int (match-string 3) 16)) (replace-match @@ -870,8 +897,8 @@ style=\"%s\">" t 'literal)) (goto-char (point-min)) - (while (re-search-forward "&JC3-\\([0-9A-F][0-9A-F][0-9A-F][0-9A-F]\\);" nil t) - (setq code (string-to-int (match-string 1) 16)) + (while (re-search-forward "&\\(R-\\)?JC3-\\([0-9A-F][0-9A-F][0-9A-F][0-9A-F]\\);" nil t) + (setq code (string-to-int (match-string 2) 16)) (replace-match (format "\"JC3-%04X\"" code code) @@ -890,7 +917,7 @@ style=\"vertical-align:middle\">" t 'literal)) (goto-char (point-min)) - (while (re-search-forward "&\\(o-\\|G-\\|g2-\\)?AJ1-\\([0-9]+\\);" nil t) + (while (re-search-forward "&\\(o-\\|G-\\|g2-\\|R-\\)?AJ1-\\([0-9]+\\);" nil t) (setq code (string-to-int (match-string 2))) (replace-match (format "\"AJ1-%05d\"" t 'literal)) (goto-char (point-min)) - (while (re-search-forward "&\\(A-\\|R-\\)?\\(UU\\+\\|U-\\)\\([0-9A-F]+\\);" nil t) + (while (re-search-forward "&\\(A-\\|G-\\|g2-\\|R-\\)?\\(UU\\+\\|U-\\)\\([0-9A-F]+\\);" nil t) (setq code (string-to-int (match-string 3) 16)) (replace-match (format "\"UU+%04X\"" (=adobe-japan1-4 "aj1-" 5 d nil) (=adobe-japan1-5 "aj1-" 5 d nil) (=adobe-japan1-6 "aj1-" 5 d nil) + (==adobe-japan1-0 "aj1-" 5 d nil) + (==adobe-japan1-1 "aj1-" 5 d nil) + (==adobe-japan1-2 "aj1-" 5 d nil) + (==adobe-japan1-3 "aj1-" 5 d nil) + (==adobe-japan1-4 "aj1-" 5 d nil) + (==adobe-japan1-5 "aj1-" 5 d nil) + (==adobe-japan1-6 "aj1-" 5 d nil) + (===adobe-japan1-0 "aj1-" 5 d nil) + (===adobe-japan1-1 "aj1-" 5 d nil) + (===adobe-japan1-2 "aj1-" 5 d nil) + (===adobe-japan1-3 "aj1-" 5 d nil) + (===adobe-japan1-4 "aj1-" 5 d nil) + (===adobe-japan1-5 "aj1-" 5 d nil) + (===adobe-japan1-6 "aj1-" 5 d nil) (=decomposition@cid) (=decomposition@hanyo-denshi) (=hanyo-denshi/ks "koseki-" 6 d nil) (=>>hanyo-denshi/ks "koseki-" 6 d nil) (=ucs@jis "u" 4 x nil) + (==ucs@jis "u" 4 x nil) + (===ucs@jis "u" 4 x nil) (=ucs@cns "u" 4 x "-t") + (==ucs@cns "u" 4 x "-t") (=jis-x0212 "jsp-" 4 x nil) (=jis-x0213-1@2000 "jx1-2000-" 4 x nil) (=jis-x0213-1@2004 "jx1-2004-" 4 x nil) (=jis-x0213-2 "jx2-" 4 x nil) (=gt "gt-" 5 d nil) (=daikanwa "dkw-" 5 d nil) + (==daikanwa "dkw-" 5 d nil) + (===daikanwa "dkw-" 5 d nil) (=gt-k "gt-k" 5 d nil) (=jef-china3 "jc3-" 4 x nil) (=big5 "b-" 4 x nil) (=ucs@ks "u" 4 x "-k") + (==ucs@ks "u" 4 x "-k") + (===ucs@ks "u" 4 x "-k") (=ks-x1001 "k0-" 4 x nil) (=jis-x0208@1978/1pr "j78-" 4 x nil) (=jis-x0208@1978/-4pr "j78-" 4 x nil) @@ -1138,7 +1186,8 @@ style=\"vertical-align:middle\">" (cond ((and (or (encode-char char '=jis-x0208@1990) (encode-char char '=jis-x0212) - (encode-char char '=jis-x0213-1)) + (encode-char char '=jis-x0213-1) + (encode-char char '=jis-x0213-2)) (setq code (encode-char char '=ucs@jis))) (format "u%04x" code) )