[Date Prev][Date Next][Thread Prev][][Date Index][Thread Index]

wrong-type-argument error in w3m-detect-meta-charset



http://www.shiro.dreamhost.com/scheme/index-j.html に行こうとしてみる
と,末尾に添付したようなエラーが発生しました.このページでは,

    <meta http-equiv="content-type" value="text/html; charset=euc-jp">

と,content= ではなく value= で文書型が指定されていたからです.

とりあえず,回避するために,

    2004-07-12  TSUCHIYA Masatoshi  <tsuchiya@namazu.org>

        * w3m.el (w3m-detect-meta-charset): Check that a content field has
        a valid value before parsing it.

という変更を行いました.

ただ,これで正しいのかどうかをちょっと悩んでいます.一応,HTML4.0 規格
の邦訳はチェックしたのですが,value で指定できるというような記述は見つ
けられませんでした.ひょっとして,xhtml の規格だと valid だったりする
のでしょうか? どなたか教えていただけませんか.

-- 
土屋 雅稔 ( TSUCHIYA Masatoshi )
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  string-match(";[ 	\n]*charset=\\([^\"]+\\)" nil)
  (and (string= http-equiv "content-type") (string-match ";[ 	\n]*charset=\\([^\"]+\\)" content))
  (if (and (string= http-equiv "content-type") (string-match ";[ 	\n]*charset=\\([^\"]+\\)" content)) (progn (throw ... ...)))
  (when (and (string= http-equiv "content-type") (string-match ";[ 	\n]*charset=\\([^\"]+\\)" content)) (throw (quote found) (match-string 1 content)))
  (let (http-equiv content) (skip-chars-forward " 	
\f\n") (while (cond ... ... ... ...) (goto-char ...) (skip-chars-forward " 	
\f\n")) (skip-chars-forward "^>") (forward-char) (when (and ... ...) (throw ... ...)))
  (w3m-parse-attributes ((http-equiv :case-ignore) (content :case-ignore)) (when (and ... ...) (throw ... ...)))
  (while (re-search-forward "<meta[ 	
\f\n]+" nil t) (w3m-parse-attributes (... ...) (when ... ...)))
  (catch (quote found) (while (re-search-forward "<meta[ 	
\f\n]+" nil t) (w3m-parse-attributes ... ...)))
  (let ((case-fold-search t)) (goto-char (point-min)) (catch (quote found) (while ... ...)))
  w3m-detect-meta-charset()
  w3m-decode-buffer("http://www.shiro.dreamhost.com/scheme/index-j.html"; nil "text/html")
  w3m-safe-decode-buffer("http://www.shiro.dreamhost.com/scheme/index-j.html"; nil "text/html")
  w3m-create-page("http://www.shiro.dreamhost.com/scheme/index-j.html"; "text/html" nil #<buffer *w3m*>)
  #[(G69328 G69329 G69330 G69331 G69332 G69333 G69334 G69335 type) "J!Jq	J!\nJÈ\f\"�+ÉÊ\"ËÌ�ÍOQ,)L
a\nJ\"8%\nJ%&J$%k\nJ'(Ò)\"�*�hÓ*('#)�+ÔÏ\nJ\"8+\nJ+\nJ&J$+,\nJ(Ò)\"�*� *(N+-,-'(Ò)\"�*�ÀÓ*('#)�-+.\nJ(Ò)\"�*�Ý*(N+/./'(Ò)\"�*�ýÓ*('#)�-\n+L)\nJ\nJ(Ò)\"�*�*(N+$
0JK\nJ(Ò)\"�*�@*(N+K\nJ\"A@	J$	J!_\nJ	J!#) 1@=q1A1 \nJÈÞ\")��Èß\nJ\"?\nJ0J	J#\nJ22\"#" [G69331 G69333 G69335 url w3m-url-authinfo-regexp type buffer-name buffer-live-p string-match match-string 1 "//" 0 nil 4 w3m-attributes w3m-arrived-add last-modified intern-soft put 5 title w3m-create-page content-type content-charset get-buffer-window w3m-message "The content (%s) has been retrieved in %s" ding t "\\`file:" "\\`about:" w3m-show-error-information "Cannot retrieve URL: %s%s" format " (exit status: %s)" "" modified-time G69332 value property w3m-arrived-db symbol real G69320 --store--69322 G69323 --store--69325 G69334 w3m-current-forms ...] 7](--G69303-- --G69304-- ----current-buffer--69300-- ----temp-buffer--69299-- --arrival-time-- --page-buffer-- --charset-- --url-- "text/html")
  apply(#[(G69328 G69329 G69330 G69331 G69332 G69333 G69334 G69335 type) "J!Jq	J!\nJÈ\f\"�+ÉÊ\"ËÌ�ÍOQ,)L
a\nJ\"8%\nJ%&J$%k\nJ'(Ò)\"�*�hÓ*('#)�+ÔÏ\nJ\"8+\nJ+\nJ&J$+,\nJ(Ò)\"�*� *(N+-,-'(Ò)\"�*�ÀÓ*('#)�-+.\nJ(Ò)\"�*�Ý*(N+/./'(Ò)\"�*�ýÓ*('#)�-\n+L)\nJ\nJ(Ò)\"�*�*(N+$
0JK\nJ(Ò)\"�*�@*(N+K\nJ\"A@	J$	J!_\nJ	J!#) 1@=q1A1 \nJÈÞ\")��Èß\nJ\"?\nJ0J	J#\nJ22\"#" [G69331 G69333 G69335 url w3m-url-authinfo-regexp type buffer-name buffer-live-p string-match match-string 1 "//" 0 nil 4 w3m-attributes w3m-arrived-add last-modified intern-soft put 5 title w3m-create-page content-type content-charset get-buffer-window w3m-message "The content (%s) has been retrieved in %s" ding t "\\`file:" "\\`about:" w3m-show-error-information "Cannot retrieve URL: %s%s" format " (exit status: %s)" "" modified-time G69332 value property w3m-arrived-db symbol real G69320 --store--69322 G69323 --store--69325 G69334 w3m-current-forms ...] 7] --G69303-- --G69304-- ----current-buffer--69300-- ----temp-buffer--69299-- --arrival-time-- --page-buffer-- --charset-- --url-- "text/html")
  (lambda (&rest --cl-rest--) (apply (quote #[... "J!Jq	J!\nJÈ\f\"�+ÉÊ\"ËÌ�ÍOQ,)L
a\nJ\"8%\nJ%&J$%k\nJ'(Ò)\"�*�hÓ*('#)�+ÔÏ\nJ\"8+\nJ+\nJ&J$+,\nJ(Ò)\"�*� *(N+-,-'(Ò)\"�*�ÀÓ*('#)�-+.\nJ(Ò)\"�*�Ý*(N+/./'(Ò)\"�*�ýÓ*('#)�-\n+L)\nJ\nJ(Ò)\"�*�*(N+$
0JK\nJ(Ò)\"�*�@*(N+K\nJ\"A@	J$	J!_\nJ	J!#) 1@=q1A1 \nJÈÞ\")��Èß\nJ\"?\nJ0J	J#\nJ22\"#" [G69331 G69333 G69335 url w3m-url-authinfo-regexp type buffer-name buffer-live-p string-match match-string 1 "//" 0 nil 4 w3m-attributes w3m-arrived-add last-modified intern-soft put 5 title w3m-create-page content-type content-charset get-buffer-window w3m-message "The content (%s) has been retrieved in %s" ding t "\\`file:" "\\`about:" w3m-show-error-information "Cannot retrieve URL: %s%s" format " (exit status: %s)" "" modified-time G69332 value property w3m-arrived-db symbol real G69320 --store--69322 G69323 --store--69325 G69334 w3m-current-forms ...] 7]) (quote --G69303--) (quote --G69304--) (quote ----current-buffer--69300--) (quote ----temp-buffer--69299--) (quote --arrival-time--) (quote --page-buffer--) (quote --charset--) (quote --url--) --cl-rest--))("text/html")
  w3m-retrieve-and-render("http://www.shiro.dreamhost.com/scheme/index-j.html"; nil nil nil "about://bookmark/" ((lambda (&rest --cl-rest--) (apply ... ... ... ... ... ... ... ... ... ... --cl-rest--)) (lambda (&rest --cl-rest--) (apply ... ... ... ... ... --cl-rest--))))
  w3m-goto-url("http://www.shiro.dreamhost.com/scheme/index-j.html"; nil nil nil "about://bookmark/" ((lambda (&rest --cl-rest--) (apply ... ... ... ... ... --cl-rest--))))
  byte-code("	\n&\fpL
 L" [url reload w3m-current-url handler --newbuffer--69365 --wconfig--69366 w3m-goto-url nil current-window-configuration] 7)
  w3m-view-this-url(nil nil)
  call-interactively(w3m-view-this-url)