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

Re: @w3m-dev/w3m-dev Summary モードで日本語の部分が化ける



>> On Mon, 15 Oct 2001 13:38:54 +0900
>> 「土」== tsuchiya@pine.kuee.kyoto-u.ac.jp (TSUCHIYA Masatoshi) said as follows:

土> ただ、今回の場合、自動コード判定ではどうしても [w3m-dev 02276] が
土> 誤判定されてしまいます(emacs-w3m 単体で閲覧しても駄目でした)

この問題ですが、[emacs-w3m:01730] のパッチを少し改変すると解決できまし
たので、sb-fml.el に対する中島さんの変更を一部戻して、sb-w3m-dev.el に
変更を局所化しました。

この変更を行っていて気が付いたのですが、shimbun-retrieve() がインデッ
クスや記事本体を取得するときに、以下のように文字コードを考慮してくれる
と、かなり文字化けの可能性が減るのではないか、と思ったのですが。

shimbun-retrieve-url() の呼び出されている個所が多すぎて、ちょっと挫折
しました。
(luna-define-generic shimbun-retrieve-url
  (shimbun url &optional no-cache no-decode)
  "Rertrieve URL contents and insert to current buffer.
Return content-type of URL as string when retrieval succeeded.")

(luna-define-method shimbun-retrieve-url
  ((shimbun shimbun) url &optional no-cache no-decode)
  (let (type)
    (when (and url (setq type (w3m-retrieve url no-decode no-cache)))
      (w3m-with-work-buffer
	(unless no-decode
	  (let ((w3m-coding-system-priority-list
		 w3m-coding-system-priority-list))
	    (when (shimbun-coding-system-internal shimbun)
	      (push (shimbun-coding-system-internal shimbun)))
	    (w3m-decode-buffer url))))
      (unless (eq (current-buffer)
		  (get-buffer w3m-work-buffer-name))
	(when no-decode
	  (set-buffer-multibyte nil))
	(insert-buffer w3m-work-buffer-name)))
    type))
>> On Mon, 15 Oct 2001 14:01:05 +0900
>> 「中」== minakaji@osaka.email.ne.jp (NAKAJIMA Mikio) said as follows:

中> Mule2 が APEL でも持っていれば、pces-om.el により decode-coding-region
中> が実装されているが、普通は持ってないよね?  emacs-w3m は APEL 必須じゃ
中> ないよね?

いえ、Emacs20 / Emacs21 環境では APEL に依存しませんが、Mule2 / XEmacs 
では APEL が必須です。更に、shimbun は FLIM に依存していますから、どち
らにしても APEL は必要です。

この辺の議論は、emacs-w3m ML の開始当初の頃のスレッドに眠っていると思
います。

-- 
土屋 雅稔  ( TSUCHIYA Masatoshi )