(mount-char-attribute-table '*instance@morpheme-entry/zh-classical)
+(mount-char-attribute-table '->HNG)
+(mount-char-attribute-table '<-HNG)
+
+
(defvar est-hide-cgi-mode nil)
(defvar est-view-url-prefix "..")
(defvar chise-wiki-view-url "view.cgi")
(defvar chise-wiki-bitmap-glyphs-url
"http://www.chise.org/glyphs")
+(defvar chise-wiki-hng-bitmap-glyphs-url
+ "http://hng.chise.org/glyphs/HNG")
+
(defvar chise-wiki-glyph-cgi-url
"http://www.chise.org/chisewiki/glyph.cgi")
(defun www-format-encode-string (string &optional without-tags as-body)
(with-temp-buffer
(insert string)
- (let (plane code start end char variants ret rret)
+ (let (plane code subcode start end char variants ret rret)
(when as-body
(goto-char (point-min))
(while (search-forward "&" nil t)
t 'literal))
(goto-char (point-min))
- (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)
+ (while (re-search-forward "&\\(o-\\|G-\\|g2-\\|R-\\)?J0-\\([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 "<img alt=\"J0-%04X\" src=\"%s/JIS-90/%02d-%02d.gif\"
+style=\"%s\">"
+ code
+ chise-wiki-bitmap-glyphs-url
+ (- (lsh code -8) 32)
+ (- (logand code 255) 32)
+ www-format-char-img-style)
+ t 'literal))
+
+ (goto-char (point-min))
+ (while (re-search-forward "&\\(o-\\|G-\\|g2-\\|R-\\)?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
t 'literal))
(goto-char (point-min))
- (while (re-search-forward "&\\(o-\\|G-\\|g2-\\)?HD-\\(IP\\|JT\\)-\\([0-9A-F][0-9A-F][0-9A-F][0-9A-F]\\);" nil t)
+ (while (re-search-forward "&\\(o-\\|G-\\|g2-\\|R-\\)?HD-\\(IP\\|JT\\)-\\([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
t 'literal))
(goto-char (point-min))
- (while (re-search-forward "&\\(o-\\|G-\\|g2-\\)?HD-KS-\\([0-9]+\\);" nil t)
+ (while (re-search-forward "&\\(o-\\|G-\\|g2-\\|R-\\)?HD-KS-\\([0-9]+\\);" nil t)
(setq code (string-to-int (match-string 2)))
(replace-match
(format "<img alt=\"HD-KS%06d\" src=\"%s/IVD/HanyoDenshi/KS%06d.png\"
t 'literal))
(goto-char (point-min))
+ (while (re-search-forward "&HNG\\([0-9]+\\)-\\([0-9][0-9][0-9][0-9]\\)\\([0-9]\\);" nil t)
+ (setq plane (match-string 1)
+ code (string-to-int (match-string 2))
+ subcode (string-to-int (match-string 3)))
+ (setq subcode
+ (if (eq subcode 0)
+ ""
+ (char-to-string (decode-char 'ascii (+ 96 subcode)))))
+ (replace-match
+ (format
+ "<img alt=\"HNG%s-%04d%s\" src=\"%s/%s/%04d%s.png\"
+style=\"vertical-align:middle; width: 48px; height: 48px\">"
+ plane code subcode
+ chise-wiki-hng-bitmap-glyphs-url
+ plane code subcode
+ www-format-char-img-style)
+ t 'literal))
+
+ (goto-char (point-min))
(while (re-search-forward "&\\(o-\\|G-\\|g2-\\|R-\\)?AJ1-\\([0-9]+\\);" nil t)
(setq code (string-to-int (match-string 2)))
(replace-match
t 'literal))
(goto-char (point-min))
+ (while (re-search-forward "&\\(o-\\|G-\\|g2-\\|R-\\)?MJ\\([0-9]+\\);" nil t)
+ (setq code (string-to-int (match-string 2)))
+ (replace-match
+ (format "<img alt=\"MJ%06d\" src=\"http://mojikiban.ipa.go.jp/search/MJ%06d\"
+style=\"vertical-align:middle; width: 48px; height: 48px\">"
+ code
+ code
+ 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
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))
+ (while (re-search-forward "&\\(G-\\|g2-\\|R-\\)?CDP-\\([0-9A-F]+\\);" nil t)
+ (setq code (string-to-int (match-string 2) 16))
(replace-match
(format "<img alt=\"CDP-%04X\" src=\"%s?char=CDP-%04X\"
style=\"%s\">"