From: MORIOKA Tomohiko Date: Thu, 18 Mar 2010 07:49:05 +0000 (+0900) Subject: (chise-wiki-bitmap-glyphs-url): Renamed from `chise-wiki-glyphs-url'. X-Git-Url: http://git.chise.org/gitweb/?p=chise%2Fest.git;a=commitdiff_plain;h=58dc9c24a1666af0633c66fd39fe3929ce72a834 (chise-wiki-bitmap-glyphs-url): Renamed from `chise-wiki-glyphs-url'. (www-format-encode-string): - Use `chise-wiki-bitmap-glyphs-url' instead of `chise-wiki-glyphs-url'. - Display &JC3-hhhh; and &ZOB-dddd;. --- diff --git a/cwiki-common.el b/cwiki-common.el index 5a8cfda..0aa7094 100644 --- a/cwiki-common.el +++ b/cwiki-common.el @@ -4,8 +4,8 @@ (defvar chise-wiki-view-url "view.cgi") (defvar chise-wiki-edit-url "edit/edit.cgi") -(defvar chise-wiki-glyphs-url - "http://chise.zinbun.kyoto-u.ac.jp/glyphs/") +(defvar chise-wiki-bitmap-glyphs-url + "http://chise.zinbun.kyoto-u.ac.jp/glyphs") (defun decode-uri-string (string &optional coding-system) (if (> (length string) 0) @@ -398,7 +398,7 @@ (replace-match (format "\"CB%05d\"" code - chise-wiki-glyphs-url + chise-wiki-bitmap-glyphs-url (/ code 1000) code) t 'literal)) @@ -409,7 +409,7 @@ (replace-match (format "\"J%s-%04X\"" plane code - chise-wiki-glyphs-url + chise-wiki-bitmap-glyphs-url plane (- (lsh code -8) 32) (- (logand code 255) 32)) @@ -422,7 +422,7 @@ (replace-match (format "\"GB%d-%04X\"" plane code - chise-wiki-glyphs-url + chise-wiki-bitmap-glyphs-url plane (- (lsh code -8) 32) (- (logand code 255) 32)) @@ -435,9 +435,27 @@ (replace-match (format "\"CNS%d-%04X\"" plane code - chise-wiki-glyphs-url + chise-wiki-bitmap-glyphs-url plane code) 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)) + (replace-match + (format "\"JC3-%04X\"" + code code) + t 'literal)) + + (goto-char (point-min)) + (while (re-search-forward "&ZOB-\\([0-9]+\\);" nil t) + (setq code (string-to-int (match-string 1))) + (replace-match + (format "\"ZOB-%04d\"" + code + chise-wiki-bitmap-glyphs-url + code) + t 'literal)) )) (goto-char (point-min)) (while (search-forward ">-" nil t)