+ (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 "<img alt=\"JC3-%04X\" src=\"http://kanji.zinbun.kyoto-u.ac.jp/db/CHINA3/Gaiji/%04x.gif\">"
+ 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 "<img alt=\"ZOB-%04d\" src=\"%s/ZOB-1968/%04d.png\">"
+ code
+ chise-wiki-bitmap-glyphs-url
+ code)
+ t 'literal))
+
+ (goto-char (point-min))
+ (while (re-search-forward "&\\(G-\\)?GT-\\([0-9]+\\);" nil t)
+ (setq code (string-to-int (match-string 2)))
+ (replace-match
+ (format "<img alt=\"GT-%05d\" src=\"%s?char=GT-%05d\">"
+ code
+ chise-wiki-glyph-cgi-url
+ code)
+ t 'literal))
+
+ (goto-char (point-min))
+ (while (re-search-forward "&B-\\([0-9A-F]+\\);" nil t)
+ (setq code (string-to-int (match-string 1) 16))
+ (replace-match
+ (format "<img alt=\"B-%04X\" src=\"%s?char=B-%04X\">"
+ code
+ chise-wiki-glyph-cgi-url
+ code)
+ t 'literal))
+
+ (goto-char (point-min))
+ (while (re-search-forward "&CDP-\\([0-9A-F]+\\);" nil t)
+ (setq code (string-to-int (match-string 1) 16))
+ (replace-match
+ (format "<img alt=\"CDP-%04X\" src=\"%s?char=CDP-%04X\">"
+ code
+ chise-wiki-glyph-cgi-url
+ code)
+ t 'literal))
+
+ (goto-char (point-min))
+ (while (re-search-forward "&UU\\+\\([0-9A-F]+\\);" nil t)
+ (setq code (string-to-int (match-string 1) 16))
+ (replace-match
+ (format "<img alt=\"UU+%04X\" src=\"http://www.unicode.org/cgi-bin/refglyph?24-%04X\">"
+ code
+ code)
+ t 'literal))
+
+ (goto-char (point-min))
+ (while (re-search-forward "&MCS-\\([0-9A-F]+\\);" nil t)
+ (setq code (string-to-int (match-string 1) 16))
+ (setq start (match-beginning 0)
+ end (match-end 0))
+ (setq char (decode-char 'system-char-id code))
+ (setq variants (or (char-feature char '->subsumptive)
+ (char-feature char '->denotational)))
+ (while (and variants
+ (setq ret (www-format-encode-string
+ (char-to-string (car variants))))
+ (string-match "&MCS-\\([0-9A-F]+\\);" ret))
+ (setq variants (cdr variants)))
+ (unless (string-match "&MCS-\\([0-9A-F]+\\);" ret)
+ (goto-char start)
+ (delete-region start end)
+ (insert ret)))
+ ))
+ ;; (goto-char (point-min))
+ ;; (while (search-forward ">-" nil t)
+ ;; (replace-match "&GT-" t 'literal))