(www-uri-decode-feature-name): Decode "o.foo" to `=+>foo'.
authorMORIOKA Tomohiko <tomo.git@chise.org>
Thu, 5 Apr 2012 09:37:22 +0000 (18:37 +0900)
committerMORIOKA Tomohiko <tomo.git@chise.org>
Thu, 5 Apr 2012 09:37:22 +0000 (18:37 +0900)
(www-uri-encode-feature-name): Encode `=+>foo' to "o.foo".
(www-uri-encode-object): Add `=+>jis-x0208@1978', `=>ucs@iso',
`=>ucs@unicode', `=>ucs@jis', `=>ucs@cns' and `=>ucs@ks' to ccs-list.
(www-format-encode-string): Support "&o-foo;", "&g2-GT-ddddd;" and
"&A-{UU+|U-}hhhh(h)*;".

cwiki-common.el

index 6e7b014..dc5ae77 100644 (file)
                                   ?>)
                      (substring uri-feature (match-end 0))))
       )
+     ((string-match "^o\\." uri-feature)
+      (intern (format "=+>%s" (substring uri-feature (match-end 0))))
+      )
      ((string-match "^a\\." uri-feature)
       (intern (format "=>%s" (substring uri-feature (match-end 0))))
       )
 (defun www-uri-encode-feature-name (feature-name)
   (setq feature-name (symbol-name feature-name))
   (cond
+   ((string-match "^=\\+>\\([^=>]+\\)" feature-name)
+    (concat "o." (substring feature-name (match-beginning 1)))
+    )
    ((string-match "^=\\([^=>]+\\)" feature-name)
     (concat "rep." (substring feature-name (match-beginning 1)))
     )
                          =daikanwa
                          =gt =gt-k
                          =>>jis-x0208 =>>jis-x0213-1
+                         =+>jis-x0208@1978
                          =>jis-x0208 =>jis-x0213-1
                          =>>gt
+                         =>ucs@iso =>ucs@unicode
+                         =>ucs@jis =>ucs@cns =>ucs@ks
                          =ruimoku-v6
                          =big5
                          =big5-cdp))
@@ -617,9 +626,9 @@ style=\"%s\">"
             t 'literal))
 
          (goto-char (point-min))
-         (while (re-search-forward "&J\\(78\\|83\\|90\\|97\\|SP\\)-\\([0-9A-F][0-9A-F][0-9A-F][0-9A-F]\\);" nil t)
-           (setq plane (match-string 1)
-                 code (string-to-int (match-string 2) 16))
+         (while (re-search-forward "&\\(o-\\)?J\\(78\\|83\\|90\\|97\\|SP\\)-\\([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
             (format "<img alt=\"J%s-%04X\" src=\"%s/JIS-%s/%02d-%02d.gif\"
 style=\"%s\">"
@@ -680,7 +689,7 @@ style=\"vertical-align:middle\">"
             t 'literal))
 
          (goto-char (point-min))
-         (while (re-search-forward "&\\(G-\\)?GT-\\([0-9]+\\);" nil t)
+         (while (re-search-forward "&\\(G-\\|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\"
@@ -740,8 +749,8 @@ style=\"vertical-align:middle\">"
             t 'literal))
 
          (goto-char (point-min))
-         (while (re-search-forward "&\\(UU\\+\\|U-\\)\\([0-9A-F]+\\);" nil t)
-           (setq code (string-to-int (match-string 2) 16))
+         (while (re-search-forward "&\\(A-\\)?\\(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\"
 style=\"vertical-align:middle\">"