(est-coded-charset-priority-list): Add `=>ucs@cognate'.
[chise/est.git] / cwiki-common.el
index 291a138..a5fc345 100644 (file)
 (defvar chise-wiki-view-url "view.cgi")
 (defvar chise-wiki-edit-url "edit.cgi")
 
-(defvar chise-wiki-bitmap-glyphs-url
-  "http://www.chise.org/glyphs")
+(defvar chise-wiki-bitmap-glyph-image-url
+  "https://image.chise.org/glyphs")
+
+(defvar chise-wiki-legacy-bitmap-glyphs-url
+  "https://www.chise.org/glyphs")
 
 (defvar chise-wiki-hng-bitmap-glyphs-url
-  "http://hng.chise.org/glyphs/HNG")
+  "https://image.hng-data.org/glyphs/HNG")
 
 (defvar chise-wiki-daijiten-bitmap-glyphs-url
-  "http://hng.chise.org/glyphs/daijiten")
+  "https://image.hng-data.org/glyphs/daijiten")
+
+(defvar chise-wiki-glyphwiki-glyph-image-url
+  "https://glyphwiki.org/glyph")
 
 (defvar chise-wiki-glyph-cgi-url
-  "http://www.chise.org/chisewiki/glyph.cgi")
+  "https://www.chise.org/chisewiki/glyph.cgi")
 
 (defvar chise-wiki-displayed-features nil)
 
     =zinbun-oracle =>zinbun-oracle
     =daikanwa
     =gt =gt-k
-    =>>>adobe-japan1
-    =>>>jis-x0208 =>>>jis-x0213-1 =>>>jis-x0213-2
+    ==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
     =+>ucs@iso =+>ucs@unicode
     =>>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
     ===ucs@iso
     =ruimoku-v6
     =big5
     ===gt
     =>ucs@iwds-1
     =>ucs@component
+    =>ucs@cognate
     =>ucs-itaiji-001
     =>ucs-itaiji-002
     =>ucs-itaiji-003
 ;;                      (t (char-to-string c))))
 ;;              feature ""))
 
-(defun www-uri-decode-feature-name (uri-feature)
-  (let (feature)
-    (setq uri-feature (decode-uri-string uri-feature 'utf-8-mcs-er))
-    (cond
-     ((string-match "^from\\." uri-feature)
-      (intern (format "<-%s"
-                     (est-uri-decode-feature-name-body
-                      (substring uri-feature (match-end 0)))))
-      )
-     ((string-match "^to\\." uri-feature)
-      (intern (format "->%s"
-                     (est-uri-decode-feature-name-body
-                      (substring uri-feature (match-end 0)))))
-      )
-     ((string-match "^rep\\." uri-feature)
-      (intern (format "=%s"
-                     (est-uri-decode-feature-name-body
-                      (substring uri-feature (match-end 0)))))
-      )
-     ((string-match "^rep[2i]\\." uri-feature)
-      (intern (format "===%s"
-                     (est-uri-decode-feature-name-body
-                      (substring uri-feature (match-end 0)))))
-      )
-     ((string-match "^g\\." uri-feature)
-      (intern (format "=>>%s"
-                     (est-uri-decode-feature-name-body
-                      (substring uri-feature (match-end 0)))))
-      )
-     ((string-match "^g[i2]\\." uri-feature)
-      (intern (format "==%s"
-                     (est-uri-decode-feature-name-body
-                      (substring uri-feature (match-end 0)))))
-      )
-     ((string-match "^gi\\([0-9]+\\)\\." uri-feature)
-      (intern (format "=>>%s%s"
-                     (make-string (string-to-int
-                                   (match-string 1 uri-feature))
-                                  ?>)
-                     (est-uri-decode-feature-name-body
-                      (substring uri-feature (match-end 0)))))
-      )
-     ((string-match "^o\\." uri-feature)
-      (intern (format "=+>%s"
-                     (est-uri-decode-feature-name-body
-                      (substring uri-feature (match-end 0)))))
-      )
-     ((string-match "^a\\." uri-feature)
-      (intern (format "=>%s"
-                     (est-uri-decode-feature-name-body
-                      (substring uri-feature (match-end 0)))))
-      )
-     ((string-match "^a\\([0-9]+\\)\\." uri-feature)
-      (intern (format "%s>%s"
-                     (make-string (string-to-int
-                                   (match-string 1 uri-feature))
-                                  ?=)
-                     (est-uri-decode-feature-name-body
-                      (substring uri-feature (match-end 0)))))
-      )
-     ((and (setq uri-feature (est-uri-decode-feature-name-body uri-feature))
-          (setq feature (intern (format "=>%s" uri-feature)))
-          (find-charset feature))
-      feature)
-     ((and (setq feature (intern (format "=>>%s" uri-feature)))
-          (find-charset feature))
-      feature)
-     ((and (setq feature (intern (format "=>>>%s" uri-feature)))
-          (find-charset feature))
-      feature)
-     ((and (setq feature (intern (format "=%s" uri-feature)))
-          (find-charset feature))
-      feature)
-     (t (intern uri-feature)))))
-
-(defun www-uri-encode-feature-name (feature-name)
-  (setq feature-name (symbol-name feature-name))
-  (cond
-   ((string-match "^=\\+>\\([^=>]+\\)" feature-name)
-    (concat "o."
-           (est-uri-encode-feature-name-body
-            (substring feature-name (match-beginning 1))))
-    )
-   ((string-match "^=\\([^=>]+\\)" feature-name)
-    (concat "rep."
-           (est-uri-encode-feature-name-body
-            (substring feature-name (match-beginning 1))))
-    )
-   ((string-match "^==\\([^=>]+\\)" feature-name)
-    (concat "g2."
-           (est-uri-encode-feature-name-body
-            (substring feature-name (match-beginning 1))))
-    )
-   ((string-match "^===\\([^=>]+\\)" feature-name)
-    (concat "repi."
-           (est-uri-encode-feature-name-body
-            (substring feature-name (match-beginning 1))))
-    )
-   ((string-match "^=>>\\([^=>]+\\)" feature-name)
-    (concat "g."
-           (est-uri-encode-feature-name-body
-            (substring feature-name (match-beginning 1))))
-    )
-   ((string-match "^=>>>\\([^=>]+\\)" feature-name)
-    (concat "gi."
-           (est-uri-encode-feature-name-body
-            (substring feature-name (match-beginning 1))))
-    )
-   ((string-match "^=>>\\(>+\\)" feature-name)
-    (format "gi%d.%s"
-           (length (match-string 1 feature-name))
-           (est-uri-encode-feature-name-body
-            (substring feature-name (match-end 1))))
-    )
-   ((string-match "^=>\\([^=>]+\\)" feature-name)
-    (concat "a."
-           (est-uri-encode-feature-name-body
-            (substring feature-name (match-beginning 1))))
-    )
-   ((string-match "^\\(=+\\)>" feature-name)
-    (format "a%d.%s"
-           (length (match-string 1 feature-name))
-           (est-uri-encode-feature-name-body
-            (substring feature-name (match-end 0))))
-    )
-   ((string-match "^->" feature-name)
-    (concat "to."
-           (est-uri-encode-feature-name-body
-            (substring feature-name (match-end 0))))
-    )
-   ((string-match "^<-" feature-name)
-    (concat "from."
-           (est-uri-encode-feature-name-body
-            (substring feature-name (match-end 0))))
-    )
-   (t (est-uri-encode-feature-name-body feature-name))))
+;; (defun www-uri-decode-feature-name (uri-feature)
+;;   (let (feature)
+;;     (setq uri-feature (decode-uri-string uri-feature 'utf-8-mcs-er))
+;;     (cond
+;;      ((string-match "^from\\." uri-feature)
+;;       (intern (format "<-%s"
+;;                       (est-uri-decode-feature-name-body
+;;                        (substring uri-feature (match-end 0)))))
+;;       )
+;;      ((string-match "^to\\." uri-feature)
+;;       (intern (format "->%s"
+;;                       (est-uri-decode-feature-name-body
+;;                        (substring uri-feature (match-end 0)))))
+;;       )
+;;      ((string-match "^rep\\." uri-feature)
+;;       (intern (format "=%s"
+;;                       (est-uri-decode-feature-name-body
+;;                        (substring uri-feature (match-end 0)))))
+;;       )
+;;      ((string-match "^rep[2i]\\." uri-feature)
+;;       (intern (format "===%s"
+;;                       (est-uri-decode-feature-name-body
+;;                        (substring uri-feature (match-end 0)))))
+;;       )
+;;      ((string-match "^g\\." uri-feature)
+;;       (intern (format "=>>%s"
+;;                       (est-uri-decode-feature-name-body
+;;                        (substring uri-feature (match-end 0)))))
+;;       )
+;;      ((string-match "^g[i2]\\." uri-feature)
+;;       (intern (format "==%s"
+;;                       (est-uri-decode-feature-name-body
+;;                        (substring uri-feature (match-end 0)))))
+;;       )
+;;      ((string-match "^gi\\([0-9]+\\)\\." uri-feature)
+;;       (intern (format "=>>%s%s"
+;;                       (make-string (string-to-int
+;;                                     (match-string 1 uri-feature))
+;;                                    ?>)
+;;                       (est-uri-decode-feature-name-body
+;;                        (substring uri-feature (match-end 0)))))
+;;       )
+;;      ((string-match "^o\\." uri-feature)
+;;       (intern (format "=+>%s"
+;;                       (est-uri-decode-feature-name-body
+;;                        (substring uri-feature (match-end 0)))))
+;;       )
+;;      ((string-match "^a\\." uri-feature)
+;;       (intern (format "=>%s"
+;;                       (est-uri-decode-feature-name-body
+;;                        (substring uri-feature (match-end 0)))))
+;;       )
+;;      ((string-match "^a\\([0-9]+\\)\\." uri-feature)
+;;       (intern (format "%s>%s"
+;;                       (make-string (string-to-int
+;;                                     (match-string 1 uri-feature))
+;;                                    ?=)
+;;                       (est-uri-decode-feature-name-body
+;;                        (substring uri-feature (match-end 0)))))
+;;       )
+;;      ((and (setq uri-feature (est-uri-decode-feature-name-body uri-feature))
+;;            (setq feature (intern (format "=>%s" uri-feature)))
+;;            (find-charset feature))
+;;       feature)
+;;      ((and (setq feature (intern (format "=>>%s" uri-feature)))
+;;            (find-charset feature))
+;;       feature)
+;;      ((and (setq feature (intern (format "=>>>%s" uri-feature)))
+;;            (find-charset feature))
+;;       feature)
+;;      ((and (setq feature (intern (format "=%s" uri-feature)))
+;;            (find-charset feature))
+;;       feature)
+;;      (t (intern uri-feature)))))
+
+;; (defun www-uri-encode-feature-name (feature-name)
+;;   (setq feature-name (symbol-name feature-name))
+;;   (cond
+;;    ((string-match "^=\\+>\\([^=>]+\\)" feature-name)
+;;     (concat "o."
+;;             (est-uri-encode-feature-name-body
+;;              (substring feature-name (match-beginning 1))))
+;;     )
+;;    ((string-match "^=\\([^=>]+\\)" feature-name)
+;;     (concat "rep."
+;;             (est-uri-encode-feature-name-body
+;;              (substring feature-name (match-beginning 1))))
+;;     )
+;;    ((string-match "^==\\([^=>]+\\)" feature-name)
+;;     (concat "g2."
+;;             (est-uri-encode-feature-name-body
+;;              (substring feature-name (match-beginning 1))))
+;;     )
+;;    ((string-match "^===\\([^=>]+\\)" feature-name)
+;;     (concat "repi."
+;;             (est-uri-encode-feature-name-body
+;;              (substring feature-name (match-beginning 1))))
+;;     )
+;;    ((string-match "^=>>\\([^=>]+\\)" feature-name)
+;;     (concat "g."
+;;             (est-uri-encode-feature-name-body
+;;              (substring feature-name (match-beginning 1))))
+;;     )
+;;    ((string-match "^=>>>\\([^=>]+\\)" feature-name)
+;;     (concat "gi."
+;;             (est-uri-encode-feature-name-body
+;;              (substring feature-name (match-beginning 1))))
+;;     )
+;;    ((string-match "^=>>\\(>+\\)" feature-name)
+;;     (format "gi%d.%s"
+;;             (length (match-string 1 feature-name))
+;;             (est-uri-encode-feature-name-body
+;;              (substring feature-name (match-end 1))))
+;;     )
+;;    ((string-match "^=>\\([^=>]+\\)" feature-name)
+;;     (concat "a."
+;;             (est-uri-encode-feature-name-body
+;;              (substring feature-name (match-beginning 1))))
+;;     )
+;;    ((string-match "^\\(=+\\)>" feature-name)
+;;     (format "a%d.%s"
+;;             (length (match-string 1 feature-name))
+;;             (est-uri-encode-feature-name-body
+;;              (substring feature-name (match-end 0))))
+;;     )
+;;    ((string-match "^->" feature-name)
+;;     (concat "to."
+;;             (est-uri-encode-feature-name-body
+;;              (substring feature-name (match-end 0))))
+;;     )
+;;    ((string-match "^<-" feature-name)
+;;     (concat "from."
+;;             (est-uri-encode-feature-name-body
+;;              (substring feature-name (match-end 0))))
+;;     )
+;;    (t (est-uri-encode-feature-name-body feature-name))))
 
 (defun www-uri-make-feature-name-url (uri-genre uri-feature-name uri-object)
   (if est-hide-cgi-mode
     (format (if est-hide-cgi-mode
                "rep.id=%s"
              "rep.id:%s")
-           (est-uri-encode-feature-name-body
-            (format "%s" (concord-object-id object))))))
+           (www-uri-encode-feature-name
+            (concord-object-id object)))))
 
 (defun est-format-object (object &optional readable)
   (if (characterp object)
                '(==cbeta               "CB" 5 d)
                '(=big5                  "B-" 4 X)
                '(=daikanwa              "M-" 5 d)
+               '(=>>daikanwa          "G-M-" 5 d)
+               '(===ucs@ks           "R-KU+" 4 X)
                coded-charset-entity-reference-alist)))
          (encode-coding-region (point-min)(point-max) 'utf-8-mcs-er)
 
             (format "<img alt=\"CB%05d\" src=\"%s/cb-gaiji/%02d/CB%05d.gif\"
 style=\"%s\">"
                     code
-                    chise-wiki-bitmap-glyphs-url
+                    chise-wiki-legacy-bitmap-glyphs-url
                     (/ code 1000) code
                     www-format-char-img-style)
             t 'literal))
@@ -930,7 +939,7 @@ style=\"%s\">"
             (format "<img alt=\"J%s-%04X\" src=\"%s/JIS-%s/%02d-%02d.gif\"
 style=\"%s\">"
                     plane code
-                    chise-wiki-bitmap-glyphs-url
+                    chise-wiki-legacy-bitmap-glyphs-url
                     plane
                     (- (lsh code -8) 32)
                     (- (logand code 255) 32)
@@ -944,7 +953,7 @@ style=\"%s\">"
             (format "<img alt=\"J0-%04X\" src=\"%s/JIS-90/%02d-%02d.gif\"
 style=\"%s\">"
                     code
-                    chise-wiki-bitmap-glyphs-url
+                    chise-wiki-legacy-bitmap-glyphs-url
                     (- (lsh code -8) 32)
                     (- (logand code 255) 32)
                     www-format-char-img-style)
@@ -958,7 +967,7 @@ style=\"%s\">"
             (format "<img alt=\"HD-%s-%04X\" src=\"%s/IVD/HanyoDenshi/%s%02d%02d.png\"
 style=\"%s\">"
                     plane code
-                    chise-wiki-bitmap-glyphs-url
+                    chise-wiki-legacy-bitmap-glyphs-url
                     plane
                     (- (lsh code -8) 32)
                     (- (logand code 255) 32)
@@ -973,7 +982,7 @@ style=\"%s\">"
             (format "<img alt=\"HD-%s-%04X\" src=\"%s/IVD/HanyoDenshi/%s%04X.png\"
 style=\"%s\">"
                     plane code
-                    chise-wiki-bitmap-glyphs-url
+                    chise-wiki-legacy-bitmap-glyphs-url
                     plane code
                     www-format-char-img-style)
             t 'literal))
@@ -985,7 +994,7 @@ style=\"%s\">"
             (format "<img alt=\"HD-KS%06d\" src=\"%s/IVD/HanyoDenshi/KS%06d.png\"
 style=\"vertical-align:middle\">"
                     code
-                    chise-wiki-bitmap-glyphs-url
+                    chise-wiki-legacy-bitmap-glyphs-url
                     code
                     www-format-char-img-style)
             t 'literal))
@@ -997,7 +1006,7 @@ style=\"vertical-align:middle\">"
             (format "<img alt=\"HD-KS%06d\" src=\"%s/IVD/HanyoDenshi/TK%08d.png\"
 style=\"vertical-align:middle\">"
                     code
-                    chise-wiki-bitmap-glyphs-url
+                    chise-wiki-legacy-bitmap-glyphs-url
                     code
                     www-format-char-img-style)
             t 'literal))
@@ -1010,7 +1019,7 @@ style=\"vertical-align:middle\">"
             (format "<img alt=\"GB%d-%04X\" src=\"%s/GB%d/%02d-%02d.gif\"
 style=\"%s\">"
                     plane code
-                    chise-wiki-bitmap-glyphs-url
+                    chise-wiki-legacy-bitmap-glyphs-url
                     plane
                     (- (lsh code -8) 32)
                     (- (logand code 255) 32)
@@ -1025,7 +1034,7 @@ style=\"%s\">"
             (format "<img alt=\"CNS%d-%04X\" src=\"%s/CNS%d/%04X.gif\"
 style=\"%s\">"
                     plane code
-                    chise-wiki-bitmap-glyphs-url
+                    chise-wiki-legacy-bitmap-glyphs-url
                     plane code
                     www-format-char-img-style)
             t 'literal))
@@ -1034,8 +1043,8 @@ style=\"%s\">"
          (while (re-search-forward "&\\(R-\\)?JC3-\\([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=\"JC3-%04X\" src=\"http://kanji.zinbun.kyoto-u.ac.jp/db/CHINA3/Gaiji/%04x.gif\">"
-                    code code)
+            (format "<img alt=\"JC3-%04X\" src=\"%s/JEF-CHINA3/%04X.png\">"
+                    code chise-wiki-bitmap-glyph-image-url code)
             t 'literal))
 
          (goto-char (point-min))
@@ -1045,7 +1054,7 @@ style=\"%s\">"
             (format "<img alt=\"ZOB-%04d\" src=\"%s/ZOB-1968/%04d.png\"
 style=\"vertical-align:middle\">"
                     code
-                    chise-wiki-bitmap-glyphs-url
+                    chise-wiki-legacy-bitmap-glyphs-url
                     code
                     www-format-char-img-style)
             t 'literal))
@@ -1075,7 +1084,7 @@ style=\"vertical-align:middle; width: auto; max-height: 60px\">"
 style=\"vertical-align:middle; width: auto; max-height: 80px\"><span
 class=\"tooltiptext\">%s</span></div>"
                     plane code
-                    chise-wiki-bitmap-glyphs-url
+                    chise-wiki-legacy-bitmap-glyphs-url
                     plane code
                     (charset-description
                      (if (string= subcode "")
@@ -1115,7 +1124,7 @@ class=\"tooltiptext\">%s</span></div>"
             (format "<img alt=\"AJ1-%05d\" src=\"%s/IVD/AdobeJapan1/CID+%d.png\"
 style=\"vertical-align:middle\">"
                     code
-                    chise-wiki-bitmap-glyphs-url
+                    chise-wiki-legacy-bitmap-glyphs-url
                     code
                     www-format-char-img-style)
             t 'literal))
@@ -1124,7 +1133,7 @@ style=\"vertical-align:middle\">"
          (while (re-search-forward "&\\(A-\\|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/MJ%06d.png\"
+            (format "<img alt=\"MJ%06d\" src=\"https://mojikiban.ipa.go.jp/MJ%06d.png\"
 style=\"vertical-align:middle; width: 48px; height: 48px\">"
                     code
                     code
@@ -1135,9 +1144,22 @@ style=\"vertical-align:middle; width: 48px; height: 48px\">"
          (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\"
+            (format "<img alt=\"u%04x\" src=\"%s/u%04x.svg\"
+style=\"vertical-align:middle; width: 48px; height: 48px\">"
+                    code
+                    chise-wiki-glyphwiki-glyph-image-url
+                    code
+                    www-format-char-img-style)
+            t 'literal))
+
+         (goto-char (point-min))
+         (while (re-search-forward "&\\(o-\\|G-\\|g2-\\|R-\\)?KU[+-]\\([0-9A-F]+\\);" nil t)
+           (setq code (string-to-int (match-string 2) 16))
+           (replace-match
+            (format "<img alt=\"u%04x-k\" src=\"%s/u%04x-k.svg\"
 style=\"vertical-align:middle; width: 48px; height: 48px\">"
                     code
+                    chise-wiki-glyphwiki-glyph-image-url
                     code
                     www-format-char-img-style)
             t 'literal))
@@ -1146,9 +1168,10 @@ style=\"vertical-align:middle; width: 48px; height: 48px\">"
          (while (re-search-forward "&A-\\(comp\\|cgn\\)U[+-]\\([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\"
+            (format "<img alt=\"u%04x\" src=\"%s/u%04x.svg\"
 style=\"vertical-align:middle; width: 48px; height: 48px\">"
                     code
+                    chise-wiki-glyphwiki-glyph-image-url
                     code
                     www-format-char-img-style)
             t 'literal))
@@ -1160,10 +1183,11 @@ style=\"vertical-align:middle; width: 48px; height: 48px\">"
            (setq plane (string-to-int (match-string 2))
                  code (string-to-int (match-string 3) 16))
            (replace-match
-            (format "<img alt=\"u%04x-itaiji-%03d\" src=\"http://glyphwiki.org/glyph/u%04x-itaiji-%03d.100px.png\"
+            (format "<img alt=\"u%04x-itaiji-%03d\" src=\"%s/u%04x-itaiji-%03d.svg\"
 style=\"vertical-align:middle; width: 48px; height: 48px\">"
                     code
                     plane
+                    chise-wiki-glyphwiki-glyph-image-url
                     code
                     plane
                     www-format-char-img-style)
@@ -1173,9 +1197,10 @@ style=\"vertical-align:middle; width: 48px; height: 48px\">"
          (while (re-search-forward "&A-IWDSU\\+\\([0-9A-F]+\\);" nil t)
            (setq code (string-to-int (match-string 1) 16))
            (replace-match
-            (format "<img alt=\"A-IWDSU+%04x\" src=\"http://glyphwiki.org/glyph/u%04x.100px.png\"
+            (format "<img alt=\"A-IWDSU+%04x\" src=\"%s/u%04x.svg\"
 style=\"vertical-align:middle; width: 48px; height: 48px\">"
                     code
+                    chise-wiki-glyphwiki-glyph-image-url
                     code
                     www-format-char-img-style)
             t 'literal))
@@ -1187,10 +1212,11 @@ style=\"vertical-align:middle; width: 48px; height: 48px\">"
            (setq plane (string-to-int (match-string 2))
                  code (string-to-int (match-string 3) 16))
            (replace-match
-            (format "<img alt=\"cdp-%04x-itaiji-%03d\" src=\"http://glyphwiki.org/glyph/cdp-%04x-itaiji-%03d.100px.png\"
+            (format "<img alt=\"cdp-%04x-itaiji-%03d\" src=\"%s/cdp-%04x-itaiji-%03d.svg\"
 style=\"vertical-align:middle; width: 48px; height: 48px\">"
                     code
                     plane
+                    chise-wiki-glyphwiki-glyph-image-url
                     code
                     plane
                     www-format-char-img-style)
@@ -1203,10 +1229,11 @@ style=\"vertical-align:middle; width: 48px; height: 48px\">"
            (setq plane (string-to-int (match-string 2))
                  code (string-to-int (match-string 3) 16))
            (replace-match
-            (format "<img alt=\"cdp-%04x-var-%03d\" src=\"http://glyphwiki.org/glyph/cdp-%04x-var-%03d.100px.png\"
+            (format "<img alt=\"cdp-%04x-var-%03d\" src=\"%s/cdp-%04x-var-%03d.svg\"
 style=\"vertical-align:middle; width: 48px; height: 48px\">"
                     code
                     plane
+                    chise-wiki-glyphwiki-glyph-image-url
                     code
                     plane
                     www-format-char-img-style)
@@ -1214,13 +1241,14 @@ style=\"vertical-align:middle; width: 48px; height: 48px\">"
 
          (goto-char (point-min))
          (while (re-search-forward
-                 "&\\(A-\\|g2-\\)?M-\\([0-9]+\\);"
+                 "&\\(A-\\|G-\\|g2-\\|R-\\)?M-\\([0-9]+\\);"
                  nil t)
            (setq code (string-to-int (match-string 2)))
            (replace-match
-            (format "<img alt=\"dkw-%05d\" src=\"http://glyphwiki.org/glyph/dkw-%05d.100px.png\"
+            (format "<img alt=\"dkw-%05d\" src=\"%s/dkw-%05d.svg\"
 style=\"vertical-align:middle; width: 48px; height: 48px\">"
                     code
+                    chise-wiki-glyphwiki-glyph-image-url
                     code
                     www-format-char-img-style)
             t 'literal))
@@ -1230,10 +1258,11 @@ style=\"vertical-align:middle; width: 48px; height: 48px\">"
            (setq plane (string-to-int (match-string 2))
                  code (string-to-int (match-string 3) 16))
            (replace-match
-            (format "<img alt=\"u%04x-var-%03d\" src=\"http://glyphwiki.org/glyph/u%04x-var-%03d.100px.png\"
+            (format "<img alt=\"u%04x-var-%03d\" src=\"%s/u%04x-var-%03d.svg\"
 style=\"vertical-align:middle; width: 48px; height: 48px\">"
                     code
                     plane
+                    chise-wiki-glyphwiki-glyph-image-url
                     code
                     plane
                     www-format-char-img-style)
@@ -1332,7 +1361,7 @@ style=\"vertical-align:middle\">"
          (while (re-search-forward "&\\(A-\\|G-\\|g2-\\|R-\\)?\\(UU\\+\\|U-\\)\\([0-9A-F]+\\);" nil t)
            (setq code (string-to-int (match-string 3) 16))
            (replace-match
-            (format "<img alt=\"UU+%04X\" src=\"http://www.unicode.org/cgi-bin/refglyph?24-%04X\"
+            (format "<img alt=\"UU+%04X\" src=\"https://www.unicode.org/cgi-bin/refglyph?24-%04X\"
 style=\"vertical-align:middle\">"
                     code
                     code
@@ -1432,6 +1461,7 @@ style=\"vertical-align:middle\">"
     (===ucs@jis                "u"     4 x "-j")
     (===daikanwa       "dkw-"  5 d nil)
     (===ucs@ks         "u"     4 x "-k")
+    (===jis-x0208@1978 "j78-"  4 x nil)
     (==ucs-itaiji-005  "u"     4 x "-itaiji-005")
     (=ucs-var-001      "u"     4 x "-var-001")
     (=ucs-var-002      "u"     4 x "-var-002")