update.
[chise/est.git] / cwiki-common.el
index 91eaa9f..51c36be 100644 (file)
     ===ucs@unicode
     ==>ucs@bucs
     ===daikanwa/+p
-    ===gt))
+    ===gt
+    =>ucs@iwds-1
+    =>ucs@component))
 
 (defun decode-uri-string (string &optional coding-system)
   (if (> (length string) 0)
@@ -1035,6 +1037,17 @@ style=\"vertical-align:middle; width: 48px; height: 48px\">"
             t 'literal))
 
          (goto-char (point-min))
+         (while (re-search-forward "&A-compU[+-]\\([0-9A-F]+\\);" nil t)
+           (setq code (string-to-int (match-string 1) 16))
+           (replace-match
+            (format "<img alt=\"u%04x\" src=\"http://glyphwiki.org/glyph/u%04x.100px.png\"
+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 "&U-i\\([0-9]+\\)\\+\\([0-9A-F]+\\);" nil t)
            (setq plane (string-to-int (match-string 1))
                  code (string-to-int (match-string 2) 16))
@@ -1086,7 +1099,7 @@ style=\"%s\">"
             t 'literal))
 
          (goto-char (point-min))
-         (while (re-search-forward "&\\(G-\\)?GT-K\\([0-9]+\\);" nil t)
+         (while (re-search-forward "&\\(A-\\|G-\\)?GT-K\\([0-9]+\\);" nil t)
            (setq code (string-to-int (match-string 2)))
            (replace-match
             (format "<img alt=\"GT-K%05d\" src=\"%s?char=GT-K%05d\"
@@ -1183,7 +1196,9 @@ style=\"vertical-align:middle\">"
                         (or (www-get-feature-value char '->subsumptive)
                             (www-get-feature-value char '->denotational)))
                   (progn
-                    (while (and variants
+                    (if (characterp variants)
+                        (setq variants (list variants)))
+                    (while (and variants
                                 (setq ret (www-format-encode-string
                                            (char-to-string (car variants))))
                                 (string-match "&MCS-\\([0-9A-F]+\\);" ret))