From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.bugs Subject: bug#35507: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird Date: Thu, 02 May 2019 10:13:07 -0700 Message-ID: <87r29gbx0c.fsf@ericabrahamsen.net> 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="95343"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 35507@debbugs.gnu.org To: Andy Moreton Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu May 02 19:14:13 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 1hMFHg-000Oew-Nw for geb-bug-gnu-emacs@m.gmane.org; Thu, 02 May 2019 19:14:12 +0200 Original-Received: from localhost ([127.0.0.1]:56237 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMFHf-0002J7-Nh for geb-bug-gnu-emacs@m.gmane.org; Thu, 02 May 2019 13:14:11 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:41235) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMFHX-0002Ii-RR for bug-gnu-emacs@gnu.org; Thu, 02 May 2019 13:14:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hMFHW-0000R5-Oj for bug-gnu-emacs@gnu.org; Thu, 02 May 2019 13:14:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33374) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hMFHW-0000Pf-KH for bug-gnu-emacs@gnu.org; Thu, 02 May 2019 13:14:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hMFHW-0000o5-5e; Thu, 02 May 2019 13:14:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eric Abrahamsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Thu, 02 May 2019 17:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35507 X-GNU-PR-Package: emacs,gnus Original-Received: via spool by 35507-submit@debbugs.gnu.org id=B35507.15568171973035 (code B ref 35507); Thu, 02 May 2019 17:14:02 +0000 Original-Received: (at 35507) by debbugs.gnu.org; 2 May 2019 17:13:17 +0000 Original-Received: from localhost ([127.0.0.1]:46916 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMFGn-0000mt-0U for submit@debbugs.gnu.org; Thu, 02 May 2019 13:13:17 -0400 Original-Received: from ericabrahamsen.net ([52.70.2.18]:51756 helo=mail.ericabrahamsen.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMFGl-0000me-3e for 35507@debbugs.gnu.org; Thu, 02 May 2019 13:13:15 -0400 Original-Received: from localhost (75-172-97-110.tukw.qwest.net [75.172.97.110]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 0459FFA026; Thu, 2 May 2019 17:13:08 +0000 (UTC) In-Reply-To: (Andy Moreton's message of "Thu, 02 May 2019 17:08:21 +0100") 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:158654 Archived-At: Andy Moreton writes: > 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. It doesn't currently, but this is a perfect use-case for the package. Shall I just add the up-thread message into the test data? Or can we come up with a more-broken version of the message?