(www-format-encode-string):
[chise/est.git] / cwiki-common.el
index 2579d22..78766fe 100644 (file)
                '(=jef-china3           "JC3-" 4 X)
                '(=ucs@unicode          "UU+" 4 X)
                '(=ucs@JP/hanazono  "hanaJU+" 4 X)
-               '(=daikanwa              "M-" 5 d)
                '(==cns11643-1        "R-C1-" 4 X)
                '(==cns11643-2        "R-C2-" 4 X)
                '(==cns11643-3        "R-C3-" 4 X)
                '(==cns11643-5        "R-C5-" 4 X)
                '(==cns11643-6        "R-C6-" 4 X)
                '(==cns11643-7        "R-C7-" 4 X)
+               '(=hanziku-1         "HZK01-" 4 X)
+               '(=hanziku-2         "HZK02-" 4 X)
+               '(=hanziku-3         "HZK03-" 4 X)
+               '(=hanziku-4         "HZK04-" 4 X)
+               '(=hanziku-5         "HZK05-" 4 X)
+               '(=hanziku-6         "HZK06-" 4 X)
+               '(=hanziku-7         "HZK07-" 4 X)
+               '(=hanziku-8         "HZK08-" 4 X)
+               '(=hanziku-9         "HZK09-" 4 X)
+               '(=hanziku-10        "HZK10-" 4 X)
+               '(=hanziku-11        "HZK11-" 4 X)
+               '(=hanziku-12        "HZK12-" 4 X)
+               '(=big5                  "B-" 4 X)
+               '(=daikanwa              "M-" 5 d)
                coded-charset-entity-reference-alist)))
          (encode-coding-region (point-min)(point-max) 'utf-8-mcs-er)
 
          (goto-char (point-min))
-         (while (re-search-forward "&\\(A-\\)?CB\\([0-9]+\\);" nil t)
+         (while (re-search-forward "&\\(A-\\|G-\\|g2-\\)?CB\\([0-9]+\\);" nil t)
            (setq code (string-to-int (match-string 2)))
            (replace-match
             (format "<img alt=\"CB%05d\" src=\"%s/cb-gaiji/%02d/CB%05d.gif\"
@@ -991,7 +1004,7 @@ style=\"vertical-align:middle; width: 48px; height: 48px\">"
             t 'literal))
 
          (goto-char (point-min))
-         (while (re-search-forward "&\\(o-\\|G-\\|g2-\\)?IU-\\([0-9A-F]+\\);" nil t)
+         (while (re-search-forward "&\\(o-\\|G-\\|g2-\\)?IU[+-]\\([0-9A-F]+\\);" nil t)
            (setq code (string-to-int (match-string 2) 16))
            (replace-match
             (format "<img alt=\"u%04x\" src=\"http://glyphwiki.org/glyph/u%04x.100px.png\"
@@ -1016,7 +1029,7 @@ style=\"vertical-align:middle; width: 48px; height: 48px\">"
             t 'literal))
 
          (goto-char (point-min))
-         (while (re-search-forward "&\\(G-\\|R-\\|g2-\\)?GT-\\([0-9]+\\);" nil t)
+         (while (re-search-forward "&\\(A-\\|G-\\|R-\\|g2-\\)?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\"
@@ -1064,6 +1077,22 @@ style=\"%s\">"
             t 'literal))
 
          (goto-char (point-min))
+         (while (re-search-forward
+                 "&\\(I-\\)?HZK\\(0[1-9]\\|1[0-2]\\)-\\([0-9A-F]+\\);" nil t)
+           (setq plane (match-string 2)
+                 code (string-to-int (match-string 3) 16))
+           (replace-match
+            (format "<img alt=\"HZK%s-%04X\" src=\"%s?char=HZK%s-%04X\"
+style=\"%s\">"
+                    plane
+                    code
+                    chise-wiki-glyph-cgi-url
+                    plane
+                    code
+                    www-format-char-img-style)
+            t 'literal))
+
+         (goto-char (point-min))
          (while (re-search-forward "&RUI6-\\([0-9A-F]+\\);" nil t)
            (setq code (string-to-int (match-string 1) 16))
            (replace-match