(www-ids-find-format-line): Encode UTF-8 characters in URL; don't use
authortomo <tomo>
Thu, 8 Sep 2005 13:38:51 +0000 (13:38 +0000)
committertomo <tomo>
Thu, 8 Sep 2005 13:38:51 +0000 (13:38 +0000)
quoted-string for the value of charset in Content-Type field.

www/www-ids-find.el

index 81fca1b..436454c 100644 (file)
         )
        (t
         (insert "<a href=\"http://mousai.kanji.zinbun.kyoto-u.ac.jp/char-desc?char=")
-        (insert str)
+         ;; (insert str)
+        (insert
+         (mapconcat (lambda (c)
+                      (if (<= (char-int c) #x7F)
+                          (char-to-string c)
+                        (format "%%%02X" c)))
+                    str ""))
         (insert "\">")
         (insert str)
         (insert "</a>")
          '(=jis-x0208@1983     "J83-" 4 X)
          '(=daikanwa           "M-" 5 d)
          coded-charset-entity-reference-alist))
-       is)
+       )
     (setq command-line-args-left (cdr command-line-args-left))
     (cond
      ((stringp components)
      (t
       (setq components nil)
       ))
-    (princ "Content-Type: text/html; charset=\"UTF-8\"
+    (princ "Content-Type: text/html; charset=UTF-8
 
 <!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"
             \"http://www.w3.org/TR/html4/loose.dtd\">