From: MORIOKA Tomohiko Date: Fri, 20 Nov 2015 14:45:41 +0000 (+0900) Subject: (est-coded-charset-priority-list): New variable. X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=c55487ded1a55be6a74ca88a61ebb46a303fd132;p=chise%2Fest.git (est-coded-charset-priority-list): New variable. (www-uri-encode-object): Refer `est-coded-charset-priority-list'. (www-format-encode-string): Support `=ucs-itaiji-nnn'. (coded-charset-GlyphWiki-id-alist): Add setting for `=ucs-var-001', `=ucs-var-002', `=ucs-var-003', `=ucs-itaiji-002', `=ucs-itaiji-084', `=big5-cdp-var-3' and `=big5-cdp-var-5'. --- diff --git a/cwiki-common.el b/cwiki-common.el index 8449cfb..13462d1 100644 --- a/cwiki-common.el +++ b/cwiki-common.el @@ -53,6 +53,41 @@ (defvar chise-wiki-displayed-features nil) +(defvar est-coded-charset-priority-list + '(; =ucs + =cns11643-1 =cns11643-2 =cns11643-3 + =cns11643-4 =cns11643-5 =cns11643-6 =cns11643-7 + =gb2312 =gb12345 + =jis-x0208 =jis-x0208@1990 + =jis-x0213-2 + =jis-x0212 + =adobe-japan1 + =cbeta =jef-china3 + =jis-x0213-1@2000 =jis-x0213-1@2004 + =jis-x0208@1983 =jis-x0208@1978 + =zinbun-oracle =>zinbun-oracle + =daikanwa + =gt =gt-k + =>>>adobe-japan1 + =>>>jis-x0208 =>>>jis-x0213-1 =>>>jis-x0213-2 + =>>jis-x0208 =>>jis-x0213-1 =>>jis-x0213-2 + =>>adobe-japan1 + =+>jis-x0208 =+>jis-x0213-1 =+>jis-x0213-2 + =+>jis-x0208@1978 + =+>adobe-japan1 + =>jis-x0208 =>jis-x0213-1 + =>>gt + =>ucs@iso =>ucs@unicode + =>ucs@jis =>ucs@cns =>ucs@ks + =>>ucs@iso =>>ucs@unicode + =>>ucs@jis =>>ucs@cns =>>ucs@ks + =>>>ucs@iso =>>>ucs@unicode + =>>>ucs@jis =>>>ucs@cns =>>>ucs@ks + =ruimoku-v6 + =big5 + =big5-cdp + =ucs-itaiji-002)) + (defun decode-uri-string (string &optional coding-system) (if (> (length string) 0) (let ((i 0) @@ -541,38 +576,7 @@ (format "%%%02X" byte)) (encode-coding-string (char-to-string object) 'utf-8-mcs-er) "") - (let ((ccs-list '(; =ucs - =cns11643-1 =cns11643-2 =cns11643-3 - =cns11643-4 =cns11643-5 =cns11643-6 =cns11643-7 - =gb2312 =gb12345 - =jis-x0208 =jis-x0208@1990 - =jis-x0213-2 - =jis-x0212 - =adobe-japan1 - =cbeta =jef-china3 - =jis-x0213-1@2000 =jis-x0213-1@2004 - =jis-x0208@1983 =jis-x0208@1978 - =zinbun-oracle =>zinbun-oracle - =daikanwa - =gt =gt-k - =>>>adobe-japan1 - =>>>jis-x0208 =>>>jis-x0213-1 =>>>jis-x0213-2 - =>>jis-x0208 =>>jis-x0213-1 =>>jis-x0213-2 - =>>adobe-japan1 - =+>jis-x0208 =+>jis-x0213-1 =+>jis-x0213-2 - =+>jis-x0208@1978 - =+>adobe-japan1 - =>jis-x0208 =>jis-x0213-1 - =>>gt - =>ucs@iso =>ucs@unicode - =>ucs@jis =>ucs@cns =>ucs@ks - =>>ucs@iso =>>ucs@unicode - =>>ucs@jis =>>ucs@cns =>>ucs@ks - =>>>ucs@iso =>>>ucs@unicode - =>>>ucs@jis =>>>ucs@cns =>>>ucs@ks - =ruimoku-v6 - =big5 - =big5-cdp)) + (let ((ccs-list est-coded-charset-priority-list) ccs ret) (while (and ccs-list (setq ccs (pop ccs-list)) @@ -980,6 +984,20 @@ style=\"vertical-align:middle; width: 48px; height: 48px\">" t 'literal)) (goto-char (point-min)) + (while (re-search-forward "&\\(o-\\|G-\\|g2-\\|R-\\)?U-i\\([0-9]+\\)\\+\\([0-9A-F]+\\);" nil t) + (setq plane (string-to-int (match-string 2)) + code (string-to-int (match-string 3) 16)) + (replace-match + (format "\"u%04x-itaiji-%03d\"" + code + plane + code + plane + www-format-char-img-style) + t 'literal)) + + (goto-char (point-min)) (while (re-search-forward "&\\(G-\\|R-\\|g2-\\)?GT-\\([0-9]+\\);" nil t) (setq code (string-to-int (match-string 2))) (replace-match @@ -1221,6 +1239,13 @@ style=\"vertical-align:middle\">" (=+>jis-x0208@1983 "j83-" 4 x nil) (=cbeta "cb" 5 d nil) (=>>daikanwa "dkw-" 5 d nil) + (=ucs-var-001 "u" 4 x "-var-001") + (=ucs-var-002 "u" 4 x "-var-002") + (=ucs-var-003 "u" 4 x "-var-003") + (=ucs-itaiji-002 "u" 4 x "-itaiji-002") + (=ucs-itaiji-084 "u" 4 x "-itaiji-084") + (=big5-cdp-var-3 "cdp-" 4 x "-var-3") + (=big5-cdp-var-5 "cdp-" 4 x "-var-5") )) (defun char-GlyphWiki-id (char)