[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#35507: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunder
From: |
Basil L. Contovounesios |
Subject: |
bug#35507: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird |
Date: |
Thu, 02 May 2019 17:10:40 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Andy Moreton <andrewjmoreton@gmail.com>
>> Date: Thu, 02 May 2019 16:43:31 +0100
>>
>> > So yes, I think Noam is right, and 'undecided' is a better alternative
>> > here.
>>
>> That is arguing for the existing code, which does not work correctly.
>
> No, the existing code simply uses the undecoded string.
>
> What I argue for is to do this:
>
> diff --git a/lisp/gnus/mm-view.el b/lisp/gnus/mm-view.el
> index 1e1d264b99..173ebfab48 100644
> --- a/lisp/gnus/mm-view.el
> +++ b/lisp/gnus/mm-view.el
> @@ -475,7 +475,7 @@ mm-display-inline-fontify
> (charset
> (mm-decode-string text charset))
> (t
> - text)))
> + (mm-decode-string text 'undecided))))
> (let ((font-lock-verbose nil) ; font-lock is a bit too verbose.
> (enable-local-variables nil))
> ;; We used to set font-lock-mode-hook to nil to avoid enabling
>
>> I am disinclined to look any further at this, as nobody else appears to
>> be running the existing code before commenting, or testing the proposed
>> patch.
>
> Please don't be offended, there's no intent to offend you here. Your
> efforts are greatly appreciated. We are just discussing a small
> change to what you were proposing, see above.
>
> Or are you saying that using undecided as above doesn't do the job?
>
> (Sorry, I don't use Gnus, so to be able to reproduce the problem and
> test a proposed solution I need detailed instructions, I cannot easily
> do it myself without investing an inordinate amount of time.)
FWIW, I use Gnus, and your suggested change to mm-display-inline-fontify
fixes the inline display of the patch in the OP for me. BTW, the last
two cond branches can be merged following your change:
diff --git a/lisp/gnus/mm-view.el b/lisp/gnus/mm-view.el
index 1e1d264b99..849488293a 100644
--- a/lisp/gnus/mm-view.el
+++ b/lisp/gnus/mm-view.el
@@ -472,10 +472,8 @@ mm-display-inline-fontify
(buffer-string)))
(coding-system
(decode-coding-string text coding-system))
- (charset
- (mm-decode-string text charset))
- (t
- text)))
+ (t
+ (mm-decode-string text (or charset 'undecided)))))
(let ((font-lock-verbose nil) ; font-lock is a bit too verbose.
(enable-local-variables nil))
;; We used to set font-lock-mode-hook to nil to avoid enabling
Thanks,
--
Basil
- bug#35507: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird, (continued)
- bug#35507: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird, Andy Moreton, 2019/05/01
- bug#35507: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird, Noam Postavsky, 2019/05/01
- bug#35507: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird, Andy Moreton, 2019/05/02
- bug#35507: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird, Eli Zaretskii, 2019/05/02
- bug#35507: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird, Andy Moreton, 2019/05/02
- bug#35507: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird, Eli Zaretskii, 2019/05/02
- bug#35507: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird, Andy Moreton, 2019/05/02
- bug#35507: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird, Eli Zaretskii, 2019/05/02
- bug#35507: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird, Eric Abrahamsen, 2019/05/02
- bug#35507: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird, Andy Moreton, 2019/05/02
- bug#35507: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird,
Basil L. Contovounesios <=
- bug#35507: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird, Eli Zaretskii, 2019/05/02
- bug#35507: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird, Eli Zaretskii, 2019/05/02
- bug#35507: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird, Basil L. Contovounesios, 2019/05/03
- bug#35507: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird, Robert Pluim, 2019/05/02
- bug#35507: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird, Eli Zaretskii, 2019/05/02
- bug#35507: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird, Noam Postavsky, 2019/05/02
- bug#35507: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird, Eli Zaretskii, 2019/05/02
- bug#35507: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird, Basil L. Contovounesios, 2019/05/03
- bug#35507: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird, Eli Zaretskii, 2019/05/03
- bug#35507: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird, Basil L. Contovounesios, 2019/05/03