From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Andy Moreton Newsgroups: gmane.emacs.bugs Subject: bug#35507: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird Date: Thu, 02 May 2019 17:08:21 +0100 Message-ID: References: <44a26585-7980-378c-9262-a567ddd3e617@cs.ucla.edu> <865zqv3tc2.fsf@gmail.com> <838svqqdp2.fsf@gnu.org> <87d0l1o8p7.fsf@gmail.com> <86v9ytz5nk.fsf@gmail.com> <2133CEDA-748F-44F0-901B-D7213645369A@gnu.org> <83ftpwq270.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="242439"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (windows-nt) To: 35507@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu May 02 18:09:29 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hMEH3-0010xF-BY for geb-bug-gnu-emacs@m.gmane.org; Thu, 02 May 2019 18:09:29 +0200 Original-Received: from localhost ([127.0.0.1]:53930 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMEH2-0002YQ-BF for geb-bug-gnu-emacs@m.gmane.org; Thu, 02 May 2019 12:09:28 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:41964) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMEGd-0002Ni-OO for bug-gnu-emacs@gnu.org; Thu, 02 May 2019 12:09:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hMEGc-0000S8-P5 for bug-gnu-emacs@gnu.org; Thu, 02 May 2019 12:09:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33263) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hMEGc-0000RS-MH for bug-gnu-emacs@gnu.org; Thu, 02 May 2019 12:09:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hMEGc-0007VL-4g; Thu, 02 May 2019 12:09:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <44a26585-7980-378c-9262-a567ddd3e617@cs.ucla.edu> Resent-From: Andy Moreton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Thu, 02 May 2019 16:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35507 X-GNU-PR-Package: emacs,gnus X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.155681332228821 (code B ref -1); Thu, 02 May 2019 16:09:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 2 May 2019 16:08:42 +0000 Original-Received: from localhost ([127.0.0.1]:46806 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMEGI-0007Un-6R for submit@debbugs.gnu.org; Thu, 02 May 2019 12:08:42 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:55709) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMEGF-0007Ua-L1 for submit@debbugs.gnu.org; Thu, 02 May 2019 12:08:41 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:55320) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hMEGA-000055-JN for submit@debbugs.gnu.org; Thu, 02 May 2019 12:08:34 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:41856) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMEG9-00028e-BI for bug-gnu-emacs@gnu.org; Thu, 02 May 2019 12:08:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hMEG8-0008W7-Cl for bug-gnu-emacs@gnu.org; Thu, 02 May 2019 12:08:33 -0400 Original-Received: from [195.159.176.226] (port=39276 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hMEG8-0008Vk-69 for bug-gnu-emacs@gnu.org; Thu, 02 May 2019 12:08:32 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.89) (envelope-from ) id 1hMEG2-000zLP-HX for bug-gnu-emacs@gnu.org; Thu, 02 May 2019 18:08:26 +0200 X-Injected-Via-Gmane: http://gmane.org/ Cancel-Lock: sha1:SjBO29a1pCZ94jGKxUsNyxA5l8w= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:158645 Archived-At: On Thu 02 May 2019, Eli Zaretskii wrote: >> From: Andy Moreton >> 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 ok, that does appear to work for the example message in the original bug report. Please push this change and we can find out if it causes any other problems. >> 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. I'm not offended, but I did want to encourage others to run the code and test the results before adding further commentary. > 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.) The gnus-mock package on GNU ELPA may of some help for testing. However I have not used it myself, nor investigated if it's collection of test data contains a suitably malformed message. AndyM