[mew-dist 20640] Re: mew-use-autoconv-when-unknown
Tatsuya Kinoshita
tats at example.com
2002年 3月 17日 (日) 10:35:58 JST
In message [mew-dist 20639], on Sat, 16 Mar 2002,
Tatsuya Kinoshita <tats at example.com> wrote:
> > ^[$B$K$[$s$4^[(B
> `C-u C-c C-e'には手が付けられておらず、従来どおりの動作になって
> いるだけです。
修正しました。元々がText/*でない場合に、誤ってデコード済みと判定
されていたのが原因です。
なお、mew-use-autoconv-when-unknownではなくmew-decode-brokenに関
係しています。
mew-use-autoconv-when-unknownでは、知らないcoding systemでのデコー
ドが必要な場合に、あきらめてしまわずに自動変換します。
mew-decode-brokenでは、本来US-ASCII(または明示されたコードセット)
で扱うべき場合や誤った書式の場合でも、テキストの内容に応じて自動
変換等によりデコードします。
--
木下達也
-------------- next part --------------
This patch is written by Tatsuya Kinoshita. Copyright is disclaimed.
diff -ur mew.orig/mew-mime.el mew/mew-mime.el
--- mew.orig/mew-mime.el Thu Mar 14 17:12:01 2002
+++ mew/mew-mime.el Sun Mar 17 10:08:11 2002
@@ -146,9 +146,9 @@
(mew-erase-buffer)
(insert
(save-excursion (set-buffer cache) (buffer-substring begin end)))
- ;; If the "charset" parameter exists, this text is already decoded.
- (unless (or mew-decode-broken
- (mew-charset-to-cs (mew-syntax-get-param params "charset")))
+ (when (and mew-decode-broken
+ (null (mew-charset-to-cs
+ (mew-charset-guess-region (point-min) (point-max)))))
(mew-cs-decode-region (point-min) (point-max) mew-cs-autoconv))
(when mew-insert-final-newline
(save-excursion
@@ -226,9 +226,9 @@
(mew-erase-buffer)
(insert
(save-excursion (set-buffer cache) (buffer-substring begin end)))
- ;; If the "charset" parameter exists, this text is already decoded.
- (unless (or mew-decode-broken
- (mew-charset-to-cs (mew-syntax-get-param params "charset")))
+ (when (and mew-decode-broken
+ (null (mew-charset-to-cs
+ (mew-charset-guess-region (point-min) (point-max)))))
(mew-cs-decode-region (point-min) (point-max) mew-cs-autoconv))
(funcall mew-prog-text/html-ext (point-min) (point-max))
(mew-summary-display-postscript 'nohook)))
@@ -324,9 +324,9 @@
(mew-erase-buffer)
(insert
(save-excursion (set-buffer cache) (buffer-substring begin end)))
- ;; If the "charset" parameter exists, this text is already decoded.
- (unless (or mew-decode-broken
- (mew-charset-to-cs (mew-syntax-get-param params "charset")))
+ (when (and mew-decode-broken
+ (null (mew-charset-to-cs
+ (mew-charset-guess-region (point-min) (point-max)))))
(mew-cs-decode-region (point-min) (point-max) mew-cs-autoconv))
(funcall mew-prog-text/xml-ext (point-min) (point-max))
(mew-summary-display-postscript 'nohook)))
Mew-dist メーリングリストの案内