GNU bug report logs - #35507
Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird

Previous Next

Packages: emacs, gnus;

Reported by: Paul Eggert <eggert <at> cs.ucla.edu>

Date: Tue, 30 Apr 2019 19:22:02 UTC

Severity: minor

Tags: fixed

Found in version 27

Done: "Basil L. Contovounesios" <contovob <at> tcd.ie>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Andy Moreton <andrewjmoreton <at> gmail.com>
To: 35507 <at> debbugs.gnu.org
Subject: bug#35507: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird
Date: Wed, 01 May 2019 17:42:18 +0100
On Wed 01 May 2019, Andy Moreton wrote:

> On Wed 01 May 2019, Robert Pluim wrote:
>
>>>>>>> On Wed, 01 May 2019 01:35:09 +0100, Andy Moreton <andrewjmoreton <at> gmail.com> said:
>>     Andy> After a bit of experimenting, this minimal patch appears to
>>     Andy> fix things.  Should this also allow the user to choose the
>>     Andy> charset if none is specified, or just hardwire it to utf-8 ?
>>
>> I think utf-8 is a good fallback if the message doesnʼt specify a
>> charset. Itʼs not going to produce any worse effects than what we have
>> now.
>
> Looking at this a bit more, the " *mm*" temp buffers produced when
> decoding the MIME parts all seems to have the right coding, so my
> previous patch looks wrong.
>
> The problem may be in `mm-display-inline-fontify' when it tries to
> choose a charset or coding system to display the MIME part inline.

This patch only affects display, so should be safer:

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 'utf-8))))
       (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





This bug report was last modified 6 years and 82 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.