(chise-wiki-bitmap-glyph-image-url): New variable.
authorMORIOKA Tomohiko <tomo.git@chise.org>
Mon, 22 Feb 2021 07:06:39 +0000 (16:06 +0900)
committerMORIOKA Tomohiko <tomo.git@chise.org>
Tue, 23 Feb 2021 12:11:54 +0000 (21:11 +0900)
(chise-wiki-legacy-bitmap-glyphs-url): Renamed from
`chise-wiki-bitmap-glyphs-url'; use "https://www.chise.org/glyphs"
instead of "http://www.chise.org/glyphs".
(chise-wiki-hng-bitmap-glyphs-url): Use
"https://image.hng-data.org/glyphs/HNG" instead of
"http://hng.chise.org/glyphs/HNG".
(chise-wiki-daijiten-bitmap-glyphs-url): Use
"https://image.hng-data.org/glyphs/daijiten" instead of
"http://hng.chise.org/glyphs/daijiten".
(chise-wiki-glyph-cgi-url): Use
"https://www.chise.org/chisewiki/glyph.cgi" instead of
"http://www.chise.org/chisewiki/glyph.cgi".
(www-format-encode-string):
- Add settings for `=>>daikanwa' and `===ucs@ks'.
- Use `chise-wiki-legacy-bitmap-glyphs-url' instead of
  `chise-wiki-bitmap-glyphs-url'.
- Use `chise-wiki-bitmap-glyph-image-url' for glyph-image path of
  JEF-CHINA3 instead of
  http://kanji.zinbun.kyoto-u.ac.jp/db/CHINA3/Gaiji/; use
  JEF-CHINA3/<HHHH>.png instead of CHINA3/Gaiji/<hhhh>.gif.
- Use https://mojikiban.ipa.go.jp/ instead of
  http://mojikiban.ipa.go.jp/.
- Use chise-wiki-glyphwiki-glyph-image-url instead of
  "http://glyphwiki.org/glyph"; use SVG instead of 100px PNG.
- Add setting for &(o-|G-|g2-|R-)KU(+<HHHH>|-<HHHHHHHH>);.
- Use "https://www.unicode.org/cgi-bin/refglyph?24-<HHHH>" instead of
  "http://www.unicode.org/cgi-bin/refglyph?24-<HHHH>".
(coded-charset-GlyphWiki-id-alist): Add setting for
`===jis-x0208@1978'.

cwiki-common.el

index 289cb9b..81892db 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)
 
                '(==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 +938,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 +952,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 +966,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 +981,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 +993,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 +1005,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 +1018,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 +1033,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 +1042,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 +1053,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 +1083,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 +1123,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 +1132,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 +1143,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 +1167,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 +1182,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 +1196,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 +1211,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 +1228,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 +1240,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 +1257,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 +1360,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 +1460,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")