(www-display-char-desc): Expect `uri-char' to be encoded as %XX
authorMORIOKA Tomohiko <tomo@kanji.zinbun.kyoto-u.ac.jp>
Wed, 17 Mar 2010 19:27:36 +0000 (04:27 +0900)
committerMORIOKA Tomohiko <tomo@kanji.zinbun.kyoto-u.ac.jp>
Wed, 17 Mar 2010 19:27:36 +0000 (04:27 +0900)
encoding; encode `uri-char' if it is a non-encoded character.
(www-batch-view): Don't use `decode-uri-string' for value of `char'.

cwiki-view.el

index 2f7721e..c30519d 100644 (file)
     (setq level 1))
   (let ((char (www-uri-decode-char uri-char)))
     (when (characterp char)
+      (when (= (length uri-char) 1)
+       (setq uri-char (www-uri-encode-char char)))
       (when (= level 1)
        (princ
         (encode-coding-string
          (format "<head>
 <title>CHISE-wiki character: %s</title>
 </head>\n"
-                 uri-char)
+                 (decode-uri-string uri-char 'utf-8-mcs-er))
          'utf-8-mcs-er))
        (princ "<body>\n"))
       (princ (format "<h%d>%s</h%d>\n"
          (setq ret (car target))
          (cond ((eq (car ret) 'char)
                 (www-display-char-desc
-                 (decode-uri-string (cdr ret) 'utf-8-mcs-er)
+                  (cdr ret) ; (decode-uri-string (cdr ret) 'utf-8-mcs-er)
                  lang)
                 )
                ((eq (car ret) 'feature)
                 (www-display-feature-desc
                  (decode-uri-string (cdr ret) 'utf-8-mcs-er)
-                 (decode-uri-string (cdr (assq 'char target)))
+                  (cdr (assq 'char target))
+                 ;; (decode-uri-string (cdr (assq 'char target)))
                  lang)
                 ))
          ))