From unknown Tue Aug 19 23:15:52 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#35507 <35507@debbugs.gnu.org> To: bug#35507 <35507@debbugs.gnu.org> Subject: Status: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird Reply-To: bug#35507 <35507@debbugs.gnu.org> Date: Wed, 20 Aug 2025 06:15:52 +0000 retitle 35507 Gnus mojibakifies UTF-8 text/x-patch attachments from Thunder= bird reassign 35507 emacs,gnus submitter 35507 Paul Eggert severity 35507 minor tag 35507 fixed thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 30 15:21:11 2019 Received: (at submit) by debbugs.gnu.org; 30 Apr 2019 19:21:11 +0000 Received: from localhost ([127.0.0.1]:42411 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hLYJQ-0001Uf-Qz for submit@debbugs.gnu.org; Tue, 30 Apr 2019 15:21:11 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:56006) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hLYJO-0001Tr-0r for submit@debbugs.gnu.org; Tue, 30 Apr 2019 15:21:07 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 20BC8161897 for ; Tue, 30 Apr 2019 12:21:00 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id nmwtW2V3lcvZ for ; Tue, 30 Apr 2019 12:20:58 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id BBE671618AC for ; Tue, 30 Apr 2019 12:20:58 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id sMZuKignGArd for ; Tue, 30 Apr 2019 12:20:58 -0700 (PDT) Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 9BBEA16180D for ; Tue, 30 Apr 2019 12:20:58 -0700 (PDT) To: submit@debbugs.gnu.org From: Paul Eggert Subject: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird Openpgp: preference=signencrypt Autocrypt: addr=eggert@cs.ucla.edu; prefer-encrypt=mutual; keydata= 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 uNcby4U= Organization: UCLA Computer Science Department Message-ID: <44a26585-7980-378c-9262-a567ddd3e617@cs.ucla.edu> Date: Tue, 30 Apr 2019 12:20:58 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------774ADBE11107067D28CE4369" Content-Language: en-US X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) This is a multi-part message in MIME format. --------------774ADBE11107067D28CE4369 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Package: emacs,gnus Version: 27 When I send email from Thunderbird with a patch attachment, Thunderbird puts something like the following into the email: =C2=A0 --------------AA6C74B60F40E0D600CCD03A =C2=A0 Content-Type: text/x-patch; =C2=A0=C2=A0 name=3D"0001-Fix-decode-time-encode-time-roundtrip-on-macOS.= patch" =C2=A0 Content-Transfer-Encoding: 8bit =C2=A0 Content-Disposition: attachment; =C2=A0=C2=A0 filename*0=3D"0001-Fix-decode-time-encode-time-roundtrip-on-= macOS.patch" =C2=A0 From 325f51c84d9ad4d9776784bd324b347ffe4fe51b Mon Sep 17 00:00:00 = 2001 =C2=A0 From: Paul Eggert =C2=A0 Date: Tue, 30 Apr 2019 10:45:48 -0700 =C2=A0 Subject: [PATCH] Fix decode-time/encode-time roundtrip on macOS =C2=A0 MIME-Version: 1.0 =C2=A0 Content-Type: text/plain; charset=3DUTF-8 =C2=A0 Content-Transfer-Encoding: 8bit =C2=A0 * src/timefns.c (Fencode_time): Ignore DST flag when the zone is =C2=A0 ... The attachment has a text/* media type but it has no charset parameter. The patch itself (output by git format-patch) says its charset is UTF-8. Unfortunately, Gnus doesn't recognize the patch as UTF-8 and so mishandles the non-ASCII characters in the attachment. To reproduce the problem, read this email with Gnus; the full attachment is attached to this email in the Thunderbird way. Although Internet RFC 2046 section 4.1.2 says the default charset for text/* media types is US-ASCII, Internet RFC 6557 section 3 amends this to say that registered text/* media types should require a charset specification (or should say it's not needed because the payload has that info, which obviously doesn't apply here). It later says that if there is a strong reason to have a charset default, the default should be UTF-8. Unfortunately Gnus apparently doesn't default to UTF-8 for such attachments, which means that sending a text/x-patch attachment from Thunderbird to Gnus messes up if the attachment contains non-ASCII characters. This has been causing problems on the Emacs mailing list for years and it bit a correspondent of mine again today; see . I have filed a Thunderbird bug report for this, as Thunderbird should specify a charset; see . However, Gnus should be a polite citizen and handle these attachments nicely rather than converting the non-ASCII UTF-8 characters to mojibake. --------------774ADBE11107067D28CE4369 Content-Type: text/x-patch; name="0001-Fix-decode-time-encode-time-roundtrip-on-macOS.patch" Content-Disposition: attachment; filename*0="0001-Fix-decode-time-encode-time-roundtrip-on-macOS.patch" Content-Transfer-Encoding: quoted-printable >From 325f51c84d9ad4d9776784bd324b347ffe4fe51b Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 30 Apr 2019 10:45:48 -0700 Subject: [PATCH] Fix decode-time/encode-time roundtrip on macOS MIME-Version: 1.0 Content-Type: text/plain; charset=3DUTF-8 Content-Transfer-Encoding: 8bit * src/timefns.c (Fencode_time): Ignore DST flag when the zone is numeric or is a cons, as the doc string says it=E2=80=99s ignored in that case, and not ignoring it causes encode-time to not invert decode-time on some platforms (Bug#35502). * test/src/timefns-tests.el (encode-time-dst-numeric-zone): New test. --- src/timefns.c | 5 +++-- test/src/timefns-tests.el | 6 ++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/timefns.c b/src/timefns.c index 5005c73b7f..7b5af6a5d2 100644 --- a/src/timefns.c +++ b/src/timefns.c @@ -1488,10 +1488,11 @@ usage: (encode-time &optional TIME FORM &rest OBS= OLESCENT-ARGUMENTS) */) tm.tm_mon =3D check_tm_member (XCAR (a), 1); a =3D XCDR (a); tm.tm_year =3D check_tm_member (XCAR (a), TM_YEAR_BASE); a =3D XCD= R (a); a =3D XCDR (a); - if (SYMBOLP (XCAR (a))) - tm.tm_isdst =3D !NILP (XCAR (a)); + Lisp_Object dstflag =3D XCAR (a); a =3D XCDR (a); zone =3D XCAR (a); + if (SYMBOLP (dstflag) && !FIXNUMP (zone) && !CONSP (zone)) + tm.tm_isdst =3D !NILP (dstflag); } else if (nargs < 6) xsignal2 (Qwrong_number_of_arguments, Qencode_time, make_fixnum (nar= gs)); diff --git a/test/src/timefns-tests.el b/test/src/timefns-tests.el index 5c858ef3bd..2c90af757f 100644 --- a/test/src/timefns-tests.el +++ b/test/src/timefns-tests.el @@ -142,3 +142,9 @@ timefns-tests--have-leap-seconds (< 0.99 (/ x y) 1.01) (< 0.99 (/ (- (float-time a)) (float-time b)) 1.01)))))))) + +(ert-deftest encode-time-dst-numeric-zone () + "Check for Bug#35502." + (should (time-equal-p + (encode-time '(29 31 17 30 4 2019 2 t 7200)) + '(23752 27217)))) --=20 2.20.1 --------------774ADBE11107067D28CE4369-- From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 30 20:35:43 2019 Received: (at submit) by debbugs.gnu.org; 1 May 2019 00:35:44 +0000 Received: from localhost ([127.0.0.1]:42849 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hLdDr-0000v4-IT for submit@debbugs.gnu.org; Tue, 30 Apr 2019 20:35:43 -0400 Received: from eggs.gnu.org ([209.51.188.92]:36400) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hLdDp-0000uq-IS for submit@debbugs.gnu.org; Tue, 30 Apr 2019 20:35:42 -0400 Received: from lists.gnu.org ([209.51.188.17]:44482) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hLdDk-00020s-EN for submit@debbugs.gnu.org; Tue, 30 Apr 2019 20:35:36 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50769) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hLdDh-0007VN-9N for bug-gnu-emacs@gnu.org; Tue, 30 Apr 2019 20:35:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hLdDb-0001qi-MC for bug-gnu-emacs@gnu.org; Tue, 30 Apr 2019 20:35:31 -0400 Received: from [195.159.176.226] (port=49722 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hLdDa-0001iU-8z for bug-gnu-emacs@gnu.org; Tue, 30 Apr 2019 20:35:26 -0400 Received: from list by blaine.gmane.org with local (Exim 4.89) (envelope-from ) id 1hLdDV-000YWI-83 for bug-gnu-emacs@gnu.org; Wed, 01 May 2019 02:35:21 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Andy Moreton Subject: Re: bug#35507: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird Date: Wed, 01 May 2019 01:35:09 +0100 Message-ID: <865zqv3tc2.fsf@gmail.com> References: <44a26585-7980-378c-9262-a567ddd3e617@cs.ucla.edu> Mime-Version: 1.0 Content-Type: text/plain User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (windows-nt) Cancel-Lock: sha1:C3bFVvbSvVnkLjvwuSTABgDQ4Xs= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 195.159.176.226 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.2 (--) On Tue 30 Apr 2019, Paul Eggert wrote: > The attachment has a text/* media type but it has no charset parameter. > The patch itself (output by git format-patch) says its charset is UTF-8. > Unfortunately, Gnus doesn't recognize the patch as UTF-8 and so > mishandles the non-ASCII characters in the attachment. To reproduce the > problem, read this email with Gnus; the full attachment is attached to > this email in the Thunderbird way. > > Although Internet RFC 2046 section 4.1.2 says the default charset for > text/* media types is US-ASCII, Internet RFC 6557 section 3 amends this > to say that registered text/* media types should require a charset > specification (or should say it's not needed because the payload has > that info, which obviously doesn't apply here). It later says that if > there is a strong reason to have a charset default, the default should > be UTF-8. > > Unfortunately Gnus apparently doesn't default to UTF-8 for such > attachments, which means that sending a text/x-patch attachment from > Thunderbird to Gnus messes up if the attachment contains non-ASCII > characters. This has been causing problems on the Emacs mailing list for > years and it bit a correspondent of mine again today; see > . > > I have filed a Thunderbird bug report for this, as Thunderbird should > specify a charset; see > . However, Gnus > should be a polite citizen and handle these attachments nicely rather > than converting the non-ASCII UTF-8 characters to mojibake. After a bit of experimenting, this minimal patch appears to fix things. Should this also allow the user to choose the charset if none is specified, or just hardwire it to utf-8 ? diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el index 3f255419e7..a99d52a7e7 100644 --- a/lisp/gnus/mm-decode.el +++ b/lisp/gnus/mm-decode.el @@ -665,6 +665,9 @@ mm-dissect-buffer (setq type (split-string (car ctl) "/")) (setq subtype (cadr type) type (car type)) + ;; Fix missing charset in Thunderbird + (unless (assq 'charset (cdr ctl)) + (push '(charset . utf-8) (cdr ctl))) (setq result (cond From debbugs-submit-bounces@debbugs.gnu.org Wed May 01 11:22:31 2019 Received: (at 35507) by debbugs.gnu.org; 1 May 2019 15:22:31 +0000 Received: from localhost ([127.0.0.1]:44619 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hLr42-0005ad-Vg for submit@debbugs.gnu.org; Wed, 01 May 2019 11:22:31 -0400 Received: from mail-wr1-f46.google.com ([209.85.221.46]:41839) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hLr40-0005aI-Vz for 35507@debbugs.gnu.org; Wed, 01 May 2019 11:22:29 -0400 Received: by mail-wr1-f46.google.com with SMTP id c12so24924559wrt.8 for <35507@debbugs.gnu.org>; Wed, 01 May 2019 08:22:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:mail-copies-to:gmane-reply-to-list :date:in-reply-to:message-id:mime-version:content-transfer-encoding; bh=x5l02Br2RAfJpX6PDSIFuwD8t51WlFKtOGYIO2/pZFQ=; b=rMyJDrTsR0HfJzyd0mU4h+ghZ/pRKC87bD8z41WbtpOBYpi6RLqs5A5WFaq5haKl1R une0DD8r9KHS6P2aw8hrY1dO3NaRU7cNLPEdgVh6BGg7oXmljj5kiYM9jwIttTbwC2Jp vHctb0BGhTdiHM9beo7WncNUs/v9whoffltnZzhVEDNYjQZGXU2CniEcX8DeUxufvcfX jJq4Y7H7cgosyR8CpyEVJ7WD/PV5Y1snQJc4/T3DjIvN9KpbmVwXCbarNmUoDSmRDipQ O3MjyDmZmXcPHgHxcAzwaJvQwLiD/gefPrj7JmsGg6mMIgjVCJ49Y1moXmrv4jv/f1Gt Uxrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:mail-copies-to :gmane-reply-to-list:date:in-reply-to:message-id:mime-version :content-transfer-encoding; bh=x5l02Br2RAfJpX6PDSIFuwD8t51WlFKtOGYIO2/pZFQ=; b=HZ4QgvAj1bUW7vS3whYEcgNXykYCOgd6lo8tqGYqDDJQ0s8f0SK/UBz+Z4Ze2PnaC5 8/bYKfbBwpLrjUpG1QWmKCdXwXOASdZKOgGcvlGGt+rVG88R91M8KxJhAvN8IPSNwrse KbzznXsP58uJeb4p5xeMiw1mtpKhFvbviImN0haDcFDmDdX2YY15auMCeP9Pk6zcRyU9 bnKIx1AhKd2WP4VQRAqs2Cj6Ma9nM+ET65WXEW1KReJTjegSTxv1AhiPK5t2rPXe7uY0 5RiqMqMBaHw4vatxbHu9RzQC60da9tXT24yQgWTF6To6E0EPE7oKL+NMp6wIhzS9IEuu 2ISw== X-Gm-Message-State: APjAAAWTc8Tuc2yhE/MMMTyak54l+TXcNtviSYEbLUeP7mvoZhhIy61S 8b/QCmCWhjNV5E7oP4ewuhJ6FOYb X-Google-Smtp-Source: APXvYqx85njYmGAGH4qqRK3WAjUhnfI97MPbxrRF3MRfwrQ0jQzbNvls7MeuRY/7KZGKhGU8YoaoLQ== X-Received: by 2002:adf:e309:: with SMTP id b9mr4938846wrj.165.1556724142719; Wed, 01 May 2019 08:22:22 -0700 (PDT) Received: from rpluim-mac ([2a01:e34:ecfc:a860:e033:8904:417c:f35a]) by smtp.gmail.com with ESMTPSA id e5sm23786818wrh.79.2019.05.01.08.22.21 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 01 May 2019 08:22:21 -0700 (PDT) From: Robert Pluim To: Andy Moreton Subject: Re: bug#35507: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird References: <44a26585-7980-378c-9262-a567ddd3e617@cs.ucla.edu> <865zqv3tc2.fsf@gmail.com> X-Debbugs-No-Ack: yes Mail-Copies-To: never Gmane-Reply-To-List: yes Date: Wed, 01 May 2019 17:22:19 +0200 In-Reply-To: <865zqv3tc2.fsf@gmail.com> (Andy Moreton's message of "Wed, 01 May 2019 01:35:09 +0100") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 35507 Cc: 35507@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >>>>> On Wed, 01 May 2019 01:35:09 +0100, Andy Moreton 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=CA=BCt specify a charset. It=CA=BCs not going to produce any worse effects than what we have now. Robert From debbugs-submit-bounces@debbugs.gnu.org Wed May 01 11:46:01 2019 Received: (at submit) by debbugs.gnu.org; 1 May 2019 15:46:01 +0000 Received: from localhost ([127.0.0.1]:44637 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hLrQn-00069f-0i for submit@debbugs.gnu.org; Wed, 01 May 2019 11:46:01 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52193) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hLrQl-00069S-1D for submit@debbugs.gnu.org; Wed, 01 May 2019 11:45:59 -0400 Received: from lists.gnu.org ([209.51.188.17]:46211) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hLrQf-0006th-74 for submit@debbugs.gnu.org; Wed, 01 May 2019 11:45:53 -0400 Received: from eggs.gnu.org ([209.51.188.92]:38317) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hLrQb-0004Mk-UB for bug-gnu-emacs@gnu.org; Wed, 01 May 2019 11:45:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hLrQV-0006nE-8V for bug-gnu-emacs@gnu.org; Wed, 01 May 2019 11:45:46 -0400 Received: from [195.159.176.226] (port=38458 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hLrQP-0006jb-B2 for bug-gnu-emacs@gnu.org; Wed, 01 May 2019 11:45:38 -0400 Received: from list by blaine.gmane.org with local (Exim 4.89) (envelope-from ) id 1hLrQL-000h1m-3T for bug-gnu-emacs@gnu.org; Wed, 01 May 2019 17:45:33 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Andy Moreton Subject: Re: bug#35507: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird Date: Wed, 01 May 2019 16:45:28 +0100 Message-ID: References: <44a26585-7980-378c-9262-a567ddd3e617@cs.ucla.edu> <865zqv3tc2.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (windows-nt) Cancel-Lock: sha1:9jcTnlSizShY6JT/HNKAnnMebUU= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 195.159.176.226 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.2 (--) On Wed 01 May 2019, Robert Pluim wrote: >>>>>> On Wed, 01 May 2019 01:35:09 +0100, Andy Moreton 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. AndyM From debbugs-submit-bounces@debbugs.gnu.org Wed May 01 12:42:38 2019 Received: (at submit) by debbugs.gnu.org; 1 May 2019 16:42:39 +0000 Received: from localhost ([127.0.0.1]:44734 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hLsJa-0007X1-Nq for submit@debbugs.gnu.org; Wed, 01 May 2019 12:42:38 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40812) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hLsJZ-0007Wo-AI for submit@debbugs.gnu.org; Wed, 01 May 2019 12:42:37 -0400 Received: from lists.gnu.org ([209.51.188.17]:42324) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hLsJU-00063f-5M for submit@debbugs.gnu.org; Wed, 01 May 2019 12:42:32 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55181) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hLsJQ-0006yn-Vr for bug-gnu-emacs@gnu.org; Wed, 01 May 2019 12:42:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hLsJN-0005Yh-Tc for bug-gnu-emacs@gnu.org; Wed, 01 May 2019 12:42:28 -0400 Received: from [195.159.176.226] (port=40798 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hLsJN-0005TZ-LQ for bug-gnu-emacs@gnu.org; Wed, 01 May 2019 12:42:25 -0400 Received: from list by blaine.gmane.org with local (Exim 4.89) (envelope-from ) id 1hLsJL-000uru-S0 for bug-gnu-emacs@gnu.org; Wed, 01 May 2019 18:42:23 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Andy Moreton Subject: Re: bug#35507: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird Date: Wed, 01 May 2019 17:42:18 +0100 Message-ID: References: <44a26585-7980-378c-9262-a567ddd3e617@cs.ucla.edu> <865zqv3tc2.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (windows-nt) Cancel-Lock: sha1:V9IrbD9FaFr3emprsOOroYcVbKc= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 195.159.176.226 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.2 (--) 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 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 From debbugs-submit-bounces@debbugs.gnu.org Wed May 01 13:32:53 2019 Received: (at 35507) by debbugs.gnu.org; 1 May 2019 17:32:53 +0000 Received: from localhost ([127.0.0.1]:44800 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hLt6C-0002Pa-L4 for submit@debbugs.gnu.org; Wed, 01 May 2019 13:32:52 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51071) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hLt6A-0002PM-DB for 35507@debbugs.gnu.org; Wed, 01 May 2019 13:32:51 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:56940) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hLt64-0007nC-V7; Wed, 01 May 2019 13:32:45 -0400 Received: from [176.228.60.248] (port=1159 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hLt61-0008S9-6o; Wed, 01 May 2019 13:32:43 -0400 Date: Wed, 01 May 2019 20:32:22 +0300 Message-Id: <83d0l2qdw9.fsf@gnu.org> From: Eli Zaretskii To: Paul Eggert In-reply-to: <44a26585-7980-378c-9262-a567ddd3e617@cs.ucla.edu> (message from Paul Eggert on Tue, 30 Apr 2019 12:20:58 -0700) Subject: Re: bug#35507: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird References: <44a26585-7980-378c-9262-a567ddd3e617@cs.ucla.edu> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 35507 Cc: 35507@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Paul Eggert > Date: Tue, 30 Apr 2019 12:20:58 -0700 > > Although Internet RFC 2046 section 4.1.2 says the default charset for > text/* media types is US-ASCII, Internet RFC 6557 section 3 amends this > to say that registered text/* media types should require a charset > specification (or should say it's not needed because the payload has > that info, which obviously doesn't apply here). It later says that if > there is a strong reason to have a charset default, the default should > be UTF-8. (You meant RFC 6657, I believe.) That's not exactly my reading of the RFC language. First, it sounds like the text there is primarily intended for the sending MUA, not for the receiving MUA. And second, this text: In order to improve interoperability with deployed agents, "text/*" media type registrations SHOULD either a. specify that the "charset" parameter is not used for the defined subtype, because the charset information is transported inside the payload (such as in "text/xml"), or b. require explicit unconditional inclusion of the "charset" parameter, eliminating the need for a default value. In accordance with option (a) above, registrations for "text/*" media types that can transport charset information inside the corresponding payloads (such as "text/html" and "text/xml") SHOULD NOT specify the use of a "charset" parameter, nor any default value, in order to avoid conflicting interpretations should the "charset" parameter value and the value specified in the payload disagree. Thus, new subtypes of the "text" media type SHOULD NOT define a default "charset" value. If there is a strong reason to do so despite this advice, they SHOULD use the "UTF-8" [RFC3629] charset as the default. Regardless of what approach is chosen, all new "text/*" registrations MUST clearly specify how the charset is determined; relying on the default defined in Section 4.1.2 of [RFC2046] is no longer permitted. However, existing "text/*" registrations that fail to specify how the charset is determined still default to US-ASCII. seems to say that: . it is preferable, for new types of text/* media, not to have any default charset, unless there's a strong reason to the contrary . all new text/* registrations must specify how the charset is determined, and not rely on the default from RFC 2046 Is text/x-patch a "new media type" or not? If it is not new, then where is it defined? I couldn't find it on the IANA site. If it _is_ "new", my reading of the RFC is that we should not define or expect any defaults, which means this bug is squarely in Thunderbird's yard, and we shouldn't change Gnus to arbitrarily assume UTF-8 as the default. > I have filed a Thunderbird bug report for this, as Thunderbird should > specify a charset; see > . However, Gnus > should be a polite citizen and handle these attachments nicely rather > than converting the non-ASCII UTF-8 characters to mojibake. Does Gnus have a command to re-decode an already decoded MIME part? If not, it should. But other than that, I don't see why we should change Gnus in this regard, certainly not unconditionally assuming UTF-8. From debbugs-submit-bounces@debbugs.gnu.org Wed May 01 13:34:00 2019 Received: (at 35507) by debbugs.gnu.org; 1 May 2019 17:34:00 +0000 Received: from localhost ([127.0.0.1]:44808 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hLt7I-0002RU-Em for submit@debbugs.gnu.org; Wed, 01 May 2019 13:34:00 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51353) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hLt7G-0002RH-OG for 35507@debbugs.gnu.org; Wed, 01 May 2019 13:33:59 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:56969) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hLt7B-00011O-7W; Wed, 01 May 2019 13:33:53 -0400 Received: from [176.228.60.248] (port=1230 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hLt75-00006P-B9; Wed, 01 May 2019 13:33:52 -0400 Date: Wed, 01 May 2019 20:33:31 +0300 Message-Id: <83bm0mqduc.fsf@gnu.org> From: Eli Zaretskii To: Andy Moreton In-reply-to: <865zqv3tc2.fsf@gmail.com> (message from Andy Moreton on Wed, 01 May 2019 01:35:09 +0100) Subject: Re: bug#35507: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird References: <44a26585-7980-378c-9262-a567ddd3e617@cs.ucla.edu> <865zqv3tc2.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 35507 Cc: 35507@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Andy Moreton > Date: Wed, 01 May 2019 01:35:09 +0100 > > After a bit of experimenting, this minimal patch appears to fix things. > Should this also allow the user to choose the charset if none is > specified, or just hardwire it to utf-8 ? > > diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el > index 3f255419e7..a99d52a7e7 100644 > --- a/lisp/gnus/mm-decode.el > +++ b/lisp/gnus/mm-decode.el > @@ -665,6 +665,9 @@ mm-dissect-buffer > (setq type (split-string (car ctl) "/")) > (setq subtype (cadr type) > type (car type)) > + ;; Fix missing charset in Thunderbird > + (unless (assq 'charset (cdr ctl)) > + (push '(charset . utf-8) (cdr ctl))) Please don't unconditionally force UTF-8 on users. At the very least this should be a user option, if at all. From debbugs-submit-bounces@debbugs.gnu.org Wed May 01 13:35:15 2019 Received: (at 35507) by debbugs.gnu.org; 1 May 2019 17:35:15 +0000 Received: from localhost ([127.0.0.1]:44816 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hLt8U-0002U8-Re for submit@debbugs.gnu.org; Wed, 01 May 2019 13:35:15 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51759) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hLt8T-0002Tt-NO for 35507@debbugs.gnu.org; Wed, 01 May 2019 13:35:14 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:57004) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hLt8N-0002ey-N8; Wed, 01 May 2019 13:35:08 -0400 Received: from [176.228.60.248] (port=1305 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hLt8K-0000u1-3u; Wed, 01 May 2019 13:35:06 -0400 Date: Wed, 01 May 2019 20:34:46 +0300 Message-Id: <83a7g6qds9.fsf@gnu.org> From: Eli Zaretskii To: Robert Pluim In-reply-to: (message from Robert Pluim on Wed, 01 May 2019 17:22:19 +0200) Subject: Re: bug#35507: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird References: <44a26585-7980-378c-9262-a567ddd3e617@cs.ucla.edu> <865zqv3tc2.fsf@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 35507 Cc: 35507@debbugs.gnu.org, andrewjmoreton@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Robert Pluim > Date: Wed, 01 May 2019 17:22:19 +0200 > Cc: 35507@debbugs.gnu.org > > 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. What considerations led you to that conclusion? From debbugs-submit-bounces@debbugs.gnu.org Wed May 01 13:37:14 2019 Received: (at 35507) by debbugs.gnu.org; 1 May 2019 17:37:14 +0000 Received: from localhost ([127.0.0.1]:44826 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hLtAN-0002XF-B5 for submit@debbugs.gnu.org; Wed, 01 May 2019 13:37:11 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52206) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hLtAM-0002X4-3j for 35507@debbugs.gnu.org; Wed, 01 May 2019 13:37:10 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:57047) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hLtAG-0004dE-Ve; Wed, 01 May 2019 13:37:05 -0400 Received: from [176.228.60.248] (port=1431 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hLtAC-0003uG-5D; Wed, 01 May 2019 13:37:03 -0400 Date: Wed, 01 May 2019 20:36:41 +0300 Message-Id: <838svqqdp2.fsf@gnu.org> From: Eli Zaretskii To: Andy Moreton In-reply-to: (message from Andy Moreton on Wed, 01 May 2019 17:42:18 +0100) Subject: Re: bug#35507: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird References: <44a26585-7980-378c-9262-a567ddd3e617@cs.ucla.edu> <865zqv3tc2.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 35507 Cc: 35507@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Andy Moreton > Date: Wed, 01 May 2019 17:42:18 +0100 > > + (mm-decode-string text 'utf-8)))) As I said, I'm not sure we should do this, let alone unconditionally force UTF-8 here, but if we must, why not use decode-coding-string? Do we really need the mm-* stuff? From debbugs-submit-bounces@debbugs.gnu.org Wed May 01 14:26:45 2019 Received: (at 35507) by debbugs.gnu.org; 1 May 2019 18:26:45 +0000 Received: from localhost ([127.0.0.1]:44880 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hLtwL-0003m0-2Z for submit@debbugs.gnu.org; Wed, 01 May 2019 14:26:45 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:54760) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hLtwI-0003ll-0e for 35507@debbugs.gnu.org; Wed, 01 May 2019 14:26:42 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 751C21618D3; Wed, 1 May 2019 11:26:36 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 6sY7nZsZYH0D; Wed, 1 May 2019 11:26:35 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 995301618D4; Wed, 1 May 2019 11:26:35 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id gjscEzSH9zqQ; Wed, 1 May 2019 11:26:35 -0700 (PDT) Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 769C916176A; Wed, 1 May 2019 11:26:35 -0700 (PDT) Subject: Re: bug#35507: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird To: Eli Zaretskii References: <44a26585-7980-378c-9262-a567ddd3e617@cs.ucla.edu> <83d0l2qdw9.fsf@gnu.org> From: Paul Eggert Openpgp: preference=signencrypt Autocrypt: addr=eggert@cs.ucla.edu; prefer-encrypt=mutual; keydata= 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 uNcby4U= Organization: UCLA Computer Science Department Message-ID: Date: Wed, 1 May 2019 11:26:35 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <83d0l2qdw9.fsf@gnu.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 35507 Cc: 35507@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) On 5/1/19 10:32 AM, Eli Zaretskii wrote: > Is text/x-patch a "new media type" or not? It's not a registered media type so strictly speaking the RFCs' SHOULD statements do not apply (and they are SHOULDs not MUSTs so they could be disregarded for good reason). That being said, the ordinary and usual intent is for the x- media types to follow these recommendations and my bug report was filed under that assumption. > my reading of the RFC is that we should not define > or expect any defaults, which means this bug is squarely in > Thunderbird's yard Ah, sorry, I see that my bug report misstated a point. This particular patch clearly identifies its own encoding because its header says "Content-Type: text/plain; charset=UTF-8". (I think Git-generated patches always specify an encoding unless it's ASCII.) So in this particular case the RFC's recommendation seems to be respected by the sender. Gnus could look for a Content-Type: header in text bodies that do not specify charsets; this would follow the Internet's robustness principle better. > I don't see why we should > change Gnus in this regard, certainly not unconditionally assuming > UTF-8. Gnus is mishandling emails sent from Thunderbird right now, so it would be a practical benefit for Gnus users if it did a better job of decoding these admittedly-iffy messages. These days, UTF-8 is by far the most common encoding specified for non-ASCII text in email and its popularity is growing, so it's the best choice for a default if Gnus will have one - certainly better than the confusing behavior that Robert Pluim observed in his Gnus session. Gnus's current behavior may have been a good idea in 1996 when RFC 2046 said US-ASCII was the default, but it stopped being a good idea in 2012 when RFC 6657 came out and said that UTF-8 should be the default if there is a default. Another possibility is that Gnus could ask the user which encoding to use when the email headers don't specify one and when the text is not ASCII; even that would be better than Gnus's current behavior of forcing US-ASCII and displaying something like "\xe2\x80\x99" when it encounters a non-ASCII character. From debbugs-submit-bounces@debbugs.gnu.org Wed May 01 15:06:46 2019 Received: (at 35507) by debbugs.gnu.org; 1 May 2019 19:06:46 +0000 Received: from localhost ([127.0.0.1]:44927 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hLuZ3-0004ic-OF for submit@debbugs.gnu.org; Wed, 01 May 2019 15:06:46 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47167) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hLuZ1-0004iK-Ge for 35507@debbugs.gnu.org; Wed, 01 May 2019 15:06:44 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:59157) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hLuYw-0000lI-01; Wed, 01 May 2019 15:06:38 -0400 Received: from [176.228.60.248] (port=2974 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hLuYa-0005R1-7b; Wed, 01 May 2019 15:06:22 -0400 Date: Wed, 01 May 2019 22:05:59 +0300 Message-Id: <83v9yuouzs.fsf@gnu.org> From: Eli Zaretskii To: Paul Eggert In-reply-to: (message from Paul Eggert on Wed, 1 May 2019 11:26:35 -0700) Subject: Re: bug#35507: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird References: <44a26585-7980-378c-9262-a567ddd3e617@cs.ucla.edu> <83d0l2qdw9.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 35507 Cc: 35507@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 35507@debbugs.gnu.org > From: Paul Eggert > Date: Wed, 1 May 2019 11:26:35 -0700 > > > I don't see why we should > > change Gnus in this regard, certainly not unconditionally assuming > > UTF-8. > Gnus is mishandling emails sent from Thunderbird right now, so it would > be a practical benefit for Gnus users if it did a better job of decoding > these admittedly-iffy messages. > > These days, UTF-8 is by far the most common encoding specified for > non-ASCII text in email and its popularity is growing, so it's the best > choice for a default if Gnus will have one - certainly better than the > confusing behavior that Robert Pluim observed in his Gnus session. > Gnus's current behavior may have been a good idea in 1996 when RFC 2046 > said US-ASCII was the default, but it stopped being a good idea in 2012 > when RFC 6657 came out and said that UTF-8 should be the default if > there is a default. > > Another possibility is that Gnus could ask the user which encoding to > use when the email headers don't specify one and when the text is not > ASCII; even that would be better than Gnus's current behavior of forcing > US-ASCII and displaying something like "\xe2\x80\x99" when it encounters > a non-ASCII character. I'm okay with having a default that's customizable. I also think Gnus should have a feature that allows the user to request "re-decoding" of a message part, because no matter how smart are we and our defaults, they will sometimes fail. From debbugs-submit-bounces@debbugs.gnu.org Wed May 01 15:48:06 2019 Received: (at 35507) by debbugs.gnu.org; 1 May 2019 19:48:06 +0000 Received: from localhost ([127.0.0.1]:44978 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hLvD4-0005hc-2Y for submit@debbugs.gnu.org; Wed, 01 May 2019 15:48:06 -0400 Received: from mail-out.m-online.net ([212.18.0.9]:38910) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hLvD1-0005hS-NW for 35507@debbugs.gnu.org; Wed, 01 May 2019 15:48:04 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 44vTTG1CPXz1rCW7; Wed, 1 May 2019 21:48:01 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 44vTTF4YHvz1rTfT; Wed, 1 May 2019 21:48:01 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id sEuFs7I4SI34; Wed, 1 May 2019 21:48:00 +0200 (CEST) X-Auth-Info: GHE02DAWFFbsBdpNO4NM1chm628Qfu7jKQwidCa1Z5C1h/upWMdUx2AV1SVcNUxS Received: from igel.home (ppp-46-244-166-171.dynamic.mnet-online.de [46.244.166.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Wed, 1 May 2019 21:48:00 +0200 (CEST) Received: by igel.home (Postfix, from userid 1000) id 8DC2A2C109C; Wed, 1 May 2019 21:47:58 +0200 (CEST) From: Andreas Schwab To: Eli Zaretskii Subject: Re: bug#35507: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird References: <44a26585-7980-378c-9262-a567ddd3e617@cs.ucla.edu> <83d0l2qdw9.fsf@gnu.org> <83v9yuouzs.fsf@gnu.org> X-Yow: A can of ASPARAGUS, 73 pigeons, some LIVE ammo, and a FROZEN DAQUIRI!! Date: Wed, 01 May 2019 21:47:58 +0200 In-Reply-To: <83v9yuouzs.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 01 May 2019 22:05:59 +0300") Message-ID: <87lfzq553l.fsf@igel.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 35507 Cc: 35507@debbugs.gnu.org, Paul Eggert X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On Mai 01 2019, Eli Zaretskii wrote: > I'm okay with having a default that's customizable. I also think Gnus > should have a feature that allows the user to request "re-decoding" of > a message part, because no matter how smart are we and our defaults, > they will sometimes fail. That already exists (K C runs the command gnus-article-view-part-as-charset). Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different." From debbugs-submit-bounces@debbugs.gnu.org Wed May 01 15:58:31 2019 Received: (at 35507) by debbugs.gnu.org; 1 May 2019 19:58:31 +0000 Received: from localhost ([127.0.0.1]:44997 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hLvN8-0005wJ-Tm for submit@debbugs.gnu.org; Wed, 01 May 2019 15:58:31 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59440) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hLvN6-0005w6-LK for 35507@debbugs.gnu.org; Wed, 01 May 2019 15:58:29 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:59826) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hLvN0-00008O-51; Wed, 01 May 2019 15:58:22 -0400 Received: from [176.228.60.248] (port=2176 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hLvMw-000073-TV; Wed, 01 May 2019 15:58:21 -0400 Date: Wed, 01 May 2019 22:57:46 +0300 Message-Id: <83sgtyoslh.fsf@gnu.org> From: Eli Zaretskii To: Andreas Schwab In-reply-to: <87lfzq553l.fsf@igel.home> (message from Andreas Schwab on Wed, 01 May 2019 21:47:58 +0200) Subject: Re: bug#35507: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird References: <44a26585-7980-378c-9262-a567ddd3e617@cs.ucla.edu> <83d0l2qdw9.fsf@gnu.org> <83v9yuouzs.fsf@gnu.org> <87lfzq553l.fsf@igel.home> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 35507 Cc: 35507@debbugs.gnu.org, eggert@cs.ucla.edu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Andreas Schwab > Cc: Paul Eggert , 35507@debbugs.gnu.org > Date: Wed, 01 May 2019 21:47:58 +0200 > > On Mai 01 2019, Eli Zaretskii wrote: > > > I'm okay with having a default that's customizable. I also think Gnus > > should have a feature that allows the user to request "re-decoding" of > > a message part, because no matter how smart are we and our defaults, > > they will sometimes fail. > > That already exists (K C runs the command > gnus-article-view-part-as-charset). Great, thanks. From debbugs-submit-bounces@debbugs.gnu.org Wed May 01 19:55:17 2019 Received: (at submit) by debbugs.gnu.org; 1 May 2019 23:55:17 +0000 Received: from localhost ([127.0.0.1]:45220 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hLz4G-00056u-O1 for submit@debbugs.gnu.org; Wed, 01 May 2019 19:55:17 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54962) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hLz4F-00056d-2V for submit@debbugs.gnu.org; Wed, 01 May 2019 19:55:15 -0400 Received: from lists.gnu.org ([209.51.188.17]:56735) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hLz49-0000qE-KE for submit@debbugs.gnu.org; Wed, 01 May 2019 19:55:09 -0400 Received: from eggs.gnu.org ([209.51.188.92]:41090) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hLz48-00043S-L5 for bug-gnu-emacs@gnu.org; Wed, 01 May 2019 19:55:09 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_40,FREEMAIL_FROM, RDNS_NONE autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hLz47-0000lY-IA for bug-gnu-emacs@gnu.org; Wed, 01 May 2019 19:55:08 -0400 Received: from [195.159.176.226] (port=59920 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hLz47-0000ik-AT for bug-gnu-emacs@gnu.org; Wed, 01 May 2019 19:55:07 -0400 Received: from list by blaine.gmane.org with local (Exim 4.89) (envelope-from ) id 1hLz44-000qQW-3X for bug-gnu-emacs@gnu.org; Thu, 02 May 2019 01:55:04 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Andy Moreton Subject: Re: bug#35507: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird Date: Thu, 02 May 2019 00:54:56 +0100 Message-ID: <86pnp14tnz.fsf@gmail.com> References: <44a26585-7980-378c-9262-a567ddd3e617@cs.ucla.edu> <865zqv3tc2.fsf@gmail.com> <838svqqdp2.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (windows-nt) Cancel-Lock: sha1:phtf52wzTcnyLx56Zue93P4/lLk= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 195.159.176.226 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.2 (--) On Wed 01 May 2019, Eli Zaretskii wrote: >> From: Andy Moreton >> Date: Wed, 01 May 2019 17:42:18 +0100 >> >> + (mm-decode-string text 'utf-8)))) > > As I said, I'm not sure we should do this, let alone unconditionally > force UTF-8 here, but if we must, why not use decode-coding-string? > Do we really need the mm-* stuff? No idea - I am not at all expert in coding systems or the internals of Gnus. This was the simplest patch that appeared to work for producing the right display, without changing the decode into the " *mm*" prefixed temp buffers created by the MIME machinery for each part. If you think `decode-coding-string' is a better patch, feel free to test and commit that instead. AndyM From debbugs-submit-bounces@debbugs.gnu.org Wed May 01 23:07:43 2019 Received: (at 35507) by debbugs.gnu.org; 2 May 2019 03:07:43 +0000 Received: from localhost ([127.0.0.1]:45341 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hM24V-0001Cz-DU for submit@debbugs.gnu.org; Wed, 01 May 2019 23:07:43 -0400 Received: from mail-qk1-f170.google.com ([209.85.222.170]:44933) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hM24T-0001Ck-2B for 35507@debbugs.gnu.org; Wed, 01 May 2019 23:07:41 -0400 Received: by mail-qk1-f170.google.com with SMTP id d14so605981qkl.11 for <35507@debbugs.gnu.org>; Wed, 01 May 2019 20:07:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=NbpCUl5BBocwTCmkEKdL/Nr+Jj2GYffdXt6Esn0MydE=; b=JqChzXQE5PA8lDlNUmmN+PaPLqexl7JA8ngJx/ZCdxBzCi0up5TunhLW/a0hFWnYvf w2NWw+5Pjpbx2mPGfUCYLT6dGrG+yBjqeZGqP9/RdOuUQJn9ifiwNXUlUalz9BF+CyGy LWwIEd6/6+ySpk5ljc5lGV0M7gCpPFj0PRHcC3BOT5UYt8IidyfcJu/lbOG6Jw7rYYzc v0KxgyqRmmo0nL03YhCqFpDWrd5iHTKEWOL3Qs6XbDa1dbVcczTpKvQvNEndRyAaZ2PR aevdPu+RIT6F3+RFKReZmIzieuC4OAjGEj2WHYUlfI1gkq+DFbiP9fObkXrG5iQyBTM9 j3dA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=NbpCUl5BBocwTCmkEKdL/Nr+Jj2GYffdXt6Esn0MydE=; b=pAPv2E6NyNDqqDfW4fewMmrMlirWWwIdT1G09FGbBjRLag8OewJqer2QkehiHzSN6N KRgutqhsWxMAKhZBKbF3WlfJwJiuHAqEmmyZRn5JYz7nsLIBp5R/XU/iJsuprSCdY0tC H7f9bzv5sgxMp3Wy/9ab3reQw3d+WU5WkqHZmuAUr6yDHUUw+hY5DilDy3fnz5OBtuxc 3AgJTO0IaHt82ZzVJ/+y0rLuEL2IXOBgFAOLK3qcRuq+yNAXPPpOL1vwlDGSxI8lt6Jo 7plL6xLy+HziAxlk4AQrqaZvhYvMUS93fSXGI5Ur0wWBhOzxYuDeTJSZaHEeZ3ZDatPS S0Fg== X-Gm-Message-State: APjAAAUJX9PZ9BVbyxwJmw4zXLsekO4h/gR5dTIqVHagGI6Ycv4X0hYR 0bhycrYiVa+Bcq6xc3rrfuDm01S1 X-Google-Smtp-Source: APXvYqzBV3gSNNblwWMxQ4b1UUAgXGYZjrbCG0EhU4V4fZkrZf8RoS3kRqFGwH13Q0UjZ+IwQlMMbw== X-Received: by 2002:a37:4c7:: with SMTP id 190mr1193632qke.128.1556766455311; Wed, 01 May 2019 20:07:35 -0700 (PDT) Received: from minid (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id m46sm2455187qta.0.2019.05.01.20.07.33 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 01 May 2019 20:07:34 -0700 (PDT) From: Noam Postavsky To: Eli Zaretskii Subject: Re: bug#35507: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird References: <44a26585-7980-378c-9262-a567ddd3e617@cs.ucla.edu> <865zqv3tc2.fsf@gmail.com> <838svqqdp2.fsf@gnu.org> Date: Wed, 01 May 2019 23:07:32 -0400 In-Reply-To: <838svqqdp2.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 01 May 2019 20:36:41 +0300") Message-ID: <87d0l1o8p7.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 35507 Cc: 35507@debbugs.gnu.org, Andy Moreton X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> From: Andy Moreton >> Date: Wed, 01 May 2019 17:42:18 +0100 >> >> + (mm-decode-string text 'utf-8)))) > > As I said, I'm not sure we should do this, let alone unconditionally > force UTF-8 here, but if we must, why not use decode-coding-string? > Do we really need the mm-* stuff? As far as I can tell, the mm-* version is useful for handling stuff lke "UTF-8" as the charset argument (which might be useful if we extract it from the "Content-Type: text/plain; charset=UTF-8" header). If passing 'utf-8, then it's just the same as calling decode-coding-string. For a default if we don't find a charset header, I guess `undecided' would make more sense, right? After all, Emacs already has the coding detection machinery, may as well use it. From debbugs-submit-bounces@debbugs.gnu.org Thu May 02 02:35:42 2019 Received: (at 35507) by debbugs.gnu.org; 2 May 2019 06:35:42 +0000 Received: from localhost ([127.0.0.1]:45443 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hM5Jk-0006It-8t for submit@debbugs.gnu.org; Thu, 02 May 2019 02:35:42 -0400 Received: from mail-wm1-f42.google.com ([209.85.128.42]:51969) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hM5Jf-0006Ie-NJ for 35507@debbugs.gnu.org; Thu, 02 May 2019 02:35:36 -0400 Received: by mail-wm1-f42.google.com with SMTP id t76so1103489wmt.1 for <35507@debbugs.gnu.org>; Wed, 01 May 2019 23:35:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-transfer-encoding; bh=iGnmh1NOPaGFzwLVcxnvIyacW8MuIA081CwpMWr5Iys=; b=lTMmyiTlCnC7AbmZfZ2AG7mezerA0uWaZiyvdHpmzkMEvIUl8GG4y+eZ5PeEHFOmUq nuaWc1ctI2SWOFA0QJlev/sDW9quWC1MiUaBuy1Cq+UiVy+AXHeKxJXXim4DRycEah1R akDlRfWgaQZ7SmApdwU5lRqA12zIHIMQNYlRBqxjkpGAvOdJ5GYNxdloRq4+mIyZnlKm qkDsiDbjy/cF8xTZ/sxzhIWIjwy14eTE82NzoXG6dB2FyFqpLMExpmmHTzpXEpwTatcD L++K8Y4fEX8gBHl5ijZLAK1HSsWFV9N1DrTEoAvCQBijoijdBZtxHYuuToLaMZoJjAKz Zw8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:mime-version:content-transfer-encoding; bh=iGnmh1NOPaGFzwLVcxnvIyacW8MuIA081CwpMWr5Iys=; b=Uru1mWsUmDirLBaS9I7RbtzGO2E3rzF4TuJPjpXF3xAggGDjszsp0wojC2ohs0kgyY n+HDqd8RTCFOiQsfo7igVTTXmUN1dT7JLi9UmIs1SZAyhPNyushzoxF4i+WNcYOhzd/D dkEtfoHRXgdE1riz870ccLjnIb8xvfugcEz1LiohyWqc7oC/N2GeNK/Yc/zqct+Xi0pZ Z5IWBkZ0CutB4txkF2aGYla55obdbGtjzgjfWVeZf0he/I2ko4wQO50inU3xBSkWwDPt H4R9z/N0BOBQKmWcAmX6MT1it4z1X0dXI9HxkLxdhaNydfBNMvcoyVICmcEAAKXNK5oQ +yGw== X-Gm-Message-State: APjAAAWOaV1E6PfU4eINHmuEX6+b6zwIDz0fyCBJRS5x6K0l26Iu+5qO SzYSz9YloWx7XdLq65u6i89srRmt X-Google-Smtp-Source: APXvYqzSWK8TpSVV0jCDhP/02CUjl7ZH1hNXTiu7IVvaDfDiYAc5AShgMWCxPty2P8bSTUPeZx0Vwg== X-Received: by 2002:a1c:1a50:: with SMTP id a77mr980936wma.113.1556778929248; Wed, 01 May 2019 23:35:29 -0700 (PDT) Received: from rpluim-mac ([149.5.228.1]) by smtp.gmail.com with ESMTPSA id g5sm1330349wrh.44.2019.05.01.23.35.27 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 01 May 2019 23:35:28 -0700 (PDT) From: Robert Pluim To: Eli Zaretskii Subject: Re: bug#35507: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird References: <44a26585-7980-378c-9262-a567ddd3e617@cs.ucla.edu> <865zqv3tc2.fsf@gmail.com> <83a7g6qds9.fsf@gnu.org> Date: Thu, 02 May 2019 08:35:27 +0200 In-Reply-To: <83a7g6qds9.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 01 May 2019 20:34:46 +0300") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 35507 Cc: 35507@debbugs.gnu.org, andrewjmoreton@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >>>>> On Wed, 01 May 2019 20:34:46 +0300, Eli Zaretskii said: >> From: Robert Pluim Date: Wed, 01 May 2019 >> 17:22:19 +0200 Cc: 35507@debbugs.gnu.org >>=20 >> I think utf-8 is a good fallback if the message doesn=CA=BCt specify >> a charset. It=CA=BCs not going to produce any worse effects than >> what we have now. Eli> What considerations led you to that conclusion? If the message requires a charset, gnus might produce mojibake. Assuming utf-8 reduces the chance of that happening. It=CA=BCs true that in particular cases a different charset should be used, but in that case the existing assumption of ASCII is wrong as well. Robert From debbugs-submit-bounces@debbugs.gnu.org Thu May 02 03:18:44 2019 Received: (at submit) by debbugs.gnu.org; 2 May 2019 07:18:44 +0000 Received: from localhost ([127.0.0.1]:45489 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hM5zQ-0007MS-E9 for submit@debbugs.gnu.org; Thu, 02 May 2019 03:18:44 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43058) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hM5zO-0007ME-DL for submit@debbugs.gnu.org; Thu, 02 May 2019 03:18:42 -0400 Received: from lists.gnu.org ([209.51.188.17]:34721) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hM5zC-0006bP-VL for submit@debbugs.gnu.org; Thu, 02 May 2019 03:18:33 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57419) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hM5zB-0001G2-UT for bug-gnu-emacs@gnu.org; Thu, 02 May 2019 03:18:30 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_40,FREEMAIL_FROM, RDNS_NONE,URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hM5z4-0006SN-1H for bug-gnu-emacs@gnu.org; Thu, 02 May 2019 03:18:24 -0400 Received: from [195.159.176.226] (port=49750 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hM5z3-0005rm-2k for bug-gnu-emacs@gnu.org; Thu, 02 May 2019 03:18:21 -0400 Received: from list by blaine.gmane.org with local (Exim 4.89) (envelope-from ) id 1hM5yg-0014HN-T0 for bug-gnu-emacs@gnu.org; Thu, 02 May 2019 09:17:58 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Andy Moreton Subject: Re: bug#35507: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird Date: Thu, 02 May 2019 08:17:51 +0100 Message-ID: <86v9ytz5nk.fsf@gmail.com> References: <44a26585-7980-378c-9262-a567ddd3e617@cs.ucla.edu> <865zqv3tc2.fsf@gmail.com> <838svqqdp2.fsf@gnu.org> <87d0l1o8p7.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (windows-nt) Cancel-Lock: sha1:35U4ff8HqTybX6sZdAJgdJxQOzI= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 195.159.176.226 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.2 (--) On Wed 01 May 2019, Noam Postavsky wrote: > Eli Zaretskii writes: > >>> From: Andy Moreton >>> Date: Wed, 01 May 2019 17:42:18 +0100 >>> >>> + (mm-decode-string text 'utf-8)))) >> >> As I said, I'm not sure we should do this, let alone unconditionally >> force UTF-8 here, but if we must, why not use decode-coding-string? >> Do we really need the mm-* stuff? > > As far as I can tell, the mm-* version is useful for handling stuff lke > "UTF-8" as the charset argument (which might be useful if we extract it > from the "Content-Type: text/plain; charset=UTF-8" header). If passing > 'utf-8, then it's just the same as calling decode-coding-string. OK, in that case we could indeed just call decode-coding-string. > For a default if we don't find a charset header, I guess `undecided' > would make more sense, right? After all, Emacs already has the coding > detection machinery, may as well use it. Please re-read the original bug report: the problem is with malformed messages that do not contain a charset field in the Content-Type header. The one-liner patch changes the default for inline display in the Gnus article buffer to assume UTF-8 when nothing is specified, rather than just inserting the text without decoding it. That should result in text that actually is UTF-8 being displayed correctly, and no change to plain ASCII. For anything else, the user can use the `gnus-mime-view-part-as-charset' command to override the default. AndyM From debbugs-submit-bounces@debbugs.gnu.org Thu May 02 07:04:40 2019 Received: (at submit) by debbugs.gnu.org; 2 May 2019 11:04:40 +0000 Received: from localhost ([127.0.0.1]:45665 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hM9W3-0004It-Tr for submit@debbugs.gnu.org; Thu, 02 May 2019 07:04:40 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37111) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hM9W2-0004IV-El for submit@debbugs.gnu.org; Thu, 02 May 2019 07:04:38 -0400 Received: from lists.gnu.org ([209.51.188.17]:53950) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hM9Vv-0006V4-Lw for submit@debbugs.gnu.org; Thu, 02 May 2019 07:04:33 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51486) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hM9Vu-0008Ux-J5 for bug-gnu-emacs@gnu.org; Thu, 02 May 2019 07:04:31 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=ALL_TRUSTED,BAYES_05, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:470:142:3::e]:40757) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hM9Vu-0006U5-FG; Thu, 02 May 2019 07:04:30 -0400 Received: from [176.12.229.109] (port=37690 helo=[10.208.206.146]) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1hM9Vs-0006b0-VW; Thu, 02 May 2019 07:04:29 -0400 Date: Thu, 02 May 2019 14:04:26 +0300 User-Agent: K-9 Mail for Android In-Reply-To: <86v9ytz5nk.fsf@gmail.com> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: bug#35507: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird To: bug-gnu-emacs@gnu.org, Andy Moreton , 35507@debbugs.gnu.org From: Eli Zaretskii Message-ID: <2133CEDA-748F-44F0-901B-D7213645369A@gnu.org> 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-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) On May 2, 2019 10:17:51 AM GMT+03:00, Andy Moreton wrote: > On Wed 01 May 2019, Noam Postavsky wrote: >=20 > > Eli Zaretskii writes: > > > >>> From: Andy Moreton > >>> Date: Wed, 01 May 2019 17:42:18 +0100 > >>>=20 > >>> + (mm-decode-string text 'utf-8)))) > >> > >> As I said, I'm not sure we should do this, let alone > unconditionally > >> force UTF-8 here, but if we must, why not use decode-coding-string? > >> Do we really need the mm-* stuff? > > > > As far as I can tell, the mm-* version is useful for handling stuff > lke > > "UTF-8" as the charset argument (which might be useful if we extract > it > > from the "Content-Type: text/plain; charset=3DUTF-8" header)=2E If > passing > > 'utf-8, then it's just the same as calling decode-coding-string=2E >=20 > OK, in that case we could indeed just call decode-coding-string=2E >=20 > > For a default if we don't find a charset header, I guess `undecided' > > would make more sense, right? After all, Emacs already has the > coding > > detection machinery, may as well use it=2E >=20 > Please re-read the original bug report: the problem is with malformed > messages that do not contain a charset field in the Content-Type > header=2E >=20 > The one-liner patch changes the default for inline display in the > Gnus article buffer to assume UTF-8 when nothing is specified, rather > than just inserting the text without decoding it=2E >=20 > That should result in text that actually is UTF-8 being displayed > correctly, and no change to plain ASCII=2E For anything else, the user > can > use the `gnus-mime-view-part-as-charset' command to override the > default=2E >=20 > AndyM Using 'undecided' doesn't disable decoding, it just means Emacs will try t= o detect the correct encoding by looking at the text (not at the charset he= ader)=2E In a UTF-8 locale, we will guess UTF-8 anyway, unless we see inva= lid sequences=2E So yes, I think Noam is right, and 'undecided' is a better alternative her= e=2E From debbugs-submit-bounces@debbugs.gnu.org Thu May 02 08:01:49 2019 Received: (at 35507) by debbugs.gnu.org; 2 May 2019 12:01:49 +0000 Received: from localhost ([127.0.0.1]:45734 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMAPM-0007kG-W4 for submit@debbugs.gnu.org; Thu, 02 May 2019 08:01:49 -0400 Received: from mail-qk1-f170.google.com ([209.85.222.170]:38270) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMAPK-0007k4-OD for 35507@debbugs.gnu.org; Thu, 02 May 2019 08:01:47 -0400 Received: by mail-qk1-f170.google.com with SMTP id g141so1223342qke.5 for <35507@debbugs.gnu.org>; Thu, 02 May 2019 05:01:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=u84IJ2kE0EIJkoKmnWWWvxrUB62/H8eUhXDytBewFm8=; b=hlMuBS9yhWpn1uo4vCcYLlieaIYTcnFijZrfLPRSnpucGUqXtryIaTPPKwJmj1zcx6 YFZV4155olLh2A4XTZsEfn319xvkgffjiJp90xcr1eAj7YT2OqU/2cgU4jhZ2osNXPcx b5oN3zdCWKWLZ8u7ML3DEbcKlaMyMSfmG5pyJtPW6w8rAG4+pylfg57pLGVkt+vFoKGe 2bAYd/rci9ziiFYsGgXYguu7PpPuZwVJeDnh77b9OseKG/cq45cz59H9N3gPBm1AN/nu haBAA46cqkMQp7BVRmuhlEpyxSgc7BnsH22rvmrCuqV4n2j5DIsws+1aCVrFr/d/kaPt y9UQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=u84IJ2kE0EIJkoKmnWWWvxrUB62/H8eUhXDytBewFm8=; b=GY+6otW6JvqMZ+5ElUmRSc3tDktTD9FjdBmtxfhhBdMMzVrXtQRFdtZW8GXJHOWYyK BML17aBVje6O5+L940oeOwmjwD0cVLHZ4IypKFGAC1FaBcuQRHLEuboy6/PDr9qep8AD 1+ofCKiJ1WRS/tI8C4BxfniDmvV4VymQ7/x92FAg+AjaL3+UBEhWZX7AlUREyaUEtiMn 3N14w5Azmguczrw74RGf+qwlz3JVyRax2vfTvKdrNb8EKqez3UyLxsAxierTyhfTr3V/ cbVM/CiggxsFGIu/7EfvLPRWgy8Wh3D2wPiz9uKKxhRCMBTh72tvODh4AdfsZvBbSCNP Qq7Q== X-Gm-Message-State: APjAAAWI25Qe3x4enUQEdWSLEQWHrXut2KJvk0wPOEzV+ZS8ZVSIk3zK Yzq+6nHDpJUN1EwwuVh8+G0iWWTS X-Google-Smtp-Source: APXvYqwcYyhurAs8CdZbVO+7GNCQFxvwhEazXSk99ynmB9ptmtEeymrUKyA7CgDyTn9J/5MVcQ/JwA== X-Received: by 2002:a37:5a46:: with SMTP id o67mr2448075qkb.31.1556798501053; Thu, 02 May 2019 05:01:41 -0700 (PDT) Received: from minid (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id p12sm7224134qta.57.2019.05.02.05.01.39 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 02 May 2019 05:01:40 -0700 (PDT) From: Noam Postavsky To: Andy Moreton Subject: Re: bug#35507: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird 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> Date: Thu, 02 May 2019 08:01:38 -0400 In-Reply-To: <86v9ytz5nk.fsf@gmail.com> (Andy Moreton's message of "Thu, 02 May 2019 08:17:51 +0100") Message-ID: <87a7g5njz1.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 35507 Cc: 35507@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Andy Moreton writes: > On Wed 01 May 2019, Noam Postavsky wrote: >> >> As far as I can tell, the mm-* version is useful for handling stuff lke >> "UTF-8" as the charset argument (which might be useful if we extract it >> from the "Content-Type: text/plain; charset=UTF-8" header). If passing >> 'utf-8, then it's just the same as calling decode-coding-string. > > OK, in that case we could indeed just call decode-coding-string. > >> For a default if we don't find a charset header, I guess `undecided' >> would make more sense, right? After all, Emacs already has the coding >> detection machinery, may as well use it. > > Please re-read the original bug report: the problem is with malformed > messages that do not contain a charset field in the Content-Type header. I understood from Paul's followup in https://debbugs.gnu.org/35507#32 that the report is mainly about the case where there is a Content-Type header with a charset field within the body of the attachment. From debbugs-submit-bounces@debbugs.gnu.org Thu May 02 11:40:54 2019 Received: (at 35507) by debbugs.gnu.org; 2 May 2019 15:40:54 +0000 Received: from localhost ([127.0.0.1]:46760 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMDpO-0006k1-1N for submit@debbugs.gnu.org; Thu, 02 May 2019 11:40:54 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48730) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMDpM-0006jo-9z for 35507@debbugs.gnu.org; Thu, 02 May 2019 11:40:52 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:45808) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMDpF-0007ni-Ur; Thu, 02 May 2019 11:40:45 -0400 Received: from [176.228.60.248] (port=3113 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hMDpE-0000PQ-Br; Thu, 02 May 2019 11:40:45 -0400 Date: Thu, 02 May 2019 18:40:24 +0300 Message-Id: <83imusq2zb.fsf@gnu.org> From: Eli Zaretskii To: Noam Postavsky In-reply-to: <87a7g5njz1.fsf@gmail.com> (message from Noam Postavsky on Thu, 02 May 2019 08:01:38 -0400) Subject: Re: bug#35507: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird 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> <87a7g5njz1.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 35507 Cc: 35507@debbugs.gnu.org, andrewjmoreton@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Noam Postavsky > Date: Thu, 02 May 2019 08:01:38 -0400 > Cc: 35507@debbugs.gnu.org > > I understood from Paul's followup in https://debbugs.gnu.org/35507#32 > that the report is mainly about the case where there is a Content-Type > header with a charset field within the body of the attachment. Yes, that's my understanding as well. So I guess Gnus should try gleaning the charset from there. The 'undecided' stuff is for when it fails, I think. From debbugs-submit-bounces@debbugs.gnu.org Thu May 02 11:43:48 2019 Received: (at submit) by debbugs.gnu.org; 2 May 2019 15:43:48 +0000 Received: from localhost ([127.0.0.1]:46765 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMDsC-0006oj-He for submit@debbugs.gnu.org; Thu, 02 May 2019 11:43:48 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49467) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMDsA-0006oV-6T for submit@debbugs.gnu.org; Thu, 02 May 2019 11:43:47 -0400 Received: from lists.gnu.org ([209.51.188.17]:36754) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hMDs5-0000QW-1i for submit@debbugs.gnu.org; Thu, 02 May 2019 11:43:41 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35611) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMDs4-0005Bh-53 for bug-gnu-emacs@gnu.org; Thu, 02 May 2019 11:43:40 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_20,FREEMAIL_FROM, RDNS_NONE autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hMDs3-0000Q8-C2 for bug-gnu-emacs@gnu.org; Thu, 02 May 2019 11:43:40 -0400 Received: from [195.159.176.226] (port=43138 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hMDs3-0000Pv-5Y for bug-gnu-emacs@gnu.org; Thu, 02 May 2019 11:43:39 -0400 Received: from list by blaine.gmane.org with local (Exim 4.89) (envelope-from ) id 1hMDs1-000LMB-EB for bug-gnu-emacs@gnu.org; Thu, 02 May 2019 17:43:37 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Andy Moreton Subject: Re: bug#35507: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird Date: Thu, 02 May 2019 16:43:31 +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> Mime-Version: 1.0 Content-Type: text/plain User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (windows-nt) Cancel-Lock: sha1:axlPcLawI3zNLa7/pcdQAhdXZHE= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 195.159.176.226 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.2 (--) On Thu 02 May 2019, Eli Zaretskii wrote: > Using 'undecided' doesn't disable decoding, it just means Emacs will try to > detect the correct encoding by looking at the text (not at the charset > header). In a UTF-8 locale, we will guess UTF-8 anyway, unless we see invalid > sequences. > > 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. The problem is in `mm-display-inline-fontify'. 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. AndyM From debbugs-submit-bounces@debbugs.gnu.org Thu May 02 11:57:52 2019 Received: (at 35507) by debbugs.gnu.org; 2 May 2019 15:57:52 +0000 Received: from localhost ([127.0.0.1]:46790 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hME5n-0007Az-PR for submit@debbugs.gnu.org; Thu, 02 May 2019 11:57:52 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53230) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hME5l-0007Al-D0 for 35507@debbugs.gnu.org; Thu, 02 May 2019 11:57:49 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:46026) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hME5g-0002KR-6k; Thu, 02 May 2019 11:57:44 -0400 Received: from [176.228.60.248] (port=4157 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hME5f-0002We-30; Thu, 02 May 2019 11:57:43 -0400 Date: Thu, 02 May 2019 18:57:23 +0300 Message-Id: <83ftpwq270.fsf@gnu.org> From: Eli Zaretskii To: Andy Moreton In-reply-to: (message from Andy Moreton on Thu, 02 May 2019 16:43:31 +0100) Subject: Re: bug#35507: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird 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> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 35507 Cc: 35507@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > 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 > 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.) From debbugs-submit-bounces@debbugs.gnu.org Thu May 02 12:08:42 2019 Received: (at submit) by debbugs.gnu.org; 2 May 2019 16:08:42 +0000 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 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 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 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 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: * X-Spam-Status: No, score=1.6 required=5.0 tests=BAYES_50,FREEMAIL_FROM, RDNS_NONE autolearn=disabled version=3.3.2 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 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 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/ To: bug-gnu-emacs@gnu.org From: Andy Moreton Subject: Re: 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 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (windows-nt) Cancel-Lock: sha1:SjBO29a1pCZ94jGKxUsNyxA5l8w= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 195.159.176.226 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.2 (--) 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 From debbugs-submit-bounces@debbugs.gnu.org Thu May 02 12:10:52 2019 Received: (at 35507) by debbugs.gnu.org; 2 May 2019 16:10:52 +0000 Received: from localhost ([127.0.0.1]:46817 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMEIN-0007YI-L2 for submit@debbugs.gnu.org; Thu, 02 May 2019 12:10:51 -0400 Received: from mail-ed1-f67.google.com ([209.85.208.67]:34700) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMEIL-0007Y5-0n for 35507@debbugs.gnu.org; Thu, 02 May 2019 12:10:49 -0400 Received: by mail-ed1-f67.google.com with SMTP id w35so954083edd.1 for <35507@debbugs.gnu.org>; Thu, 02 May 2019 09:10:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=W1qyBb5kz6WdhmyMBC0d6y2u0wpYmecrwuUBHK8ZpXs=; b=EKJpWId3GRZo7NUjfDfv6G14iWXtE2uCOIjvRfJmzRQ7bWlFb7gTFedOWk5tSoC6PA hoejMBb/2gHpPywcXyNW9ERUHytr/oy+LpqHGiRPgX7xonEaYRcrLt0dsL2ue1KlqkQQ cPIM/M+u+fjkp6gvuJvABUeIXSOOnCg/4tBvuf6ietWnY5LC6BSITHm2wixtS7Sp5QEm KHklH0YQvKtLyF/PL0HLd8RdwyC+G3jCirdukeTsbaz8iJvMFh6ZCy2+31NUQKJ2JxCq OMMCHYY3RXJUT+Z36nRRx4QT0uwf5RLap/PtFcwZhhOuBMdTnLnTYF2jIrMln3BWvlNr TT9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=W1qyBb5kz6WdhmyMBC0d6y2u0wpYmecrwuUBHK8ZpXs=; b=BSyt+7uBeiQ9iDVjiCjizAlx1mMGYWmuSIGVBs4aGk76+eZ+76mOmQG2AmHsuIL84j T1Lb9N4GyCZkfgSPJhDuZ1NHZF7QxE4lKU3qCdb9Ceh0AzrOLZPZpRes6TiJwpFm1jzv gfMIrXk5nem38TwFazg9cJZ/i+eIc2hzy+qvHjde0R/V0M6iVpKGeQRAeusH/ohl2oH0 LorVeYH52ZKZRz/YaUrQX5SZ9dxRtp8DwhFgs8oJlqir9ZKbyW5UeJ+bFo2ha7b/Nfhg dtXMgM1TXETb+xFh7cff+dr+DCJ4FaV2VDY32vndXz5k75JZeaBhi0k6vTKWHDn7R5qU U8pA== X-Gm-Message-State: APjAAAW5ZI2AE7bHx2yP9HZ7kWwsR8a8Z6DDu47yzZnGTFjvN6139m5z cNylaGfrMPNlvcwnfJmcmLhQvg== X-Google-Smtp-Source: APXvYqzODN40/kxZoax5aMcG3U6AzkcPlti6IZEDOnXVRerSpnXvcnpsTodW71etxkoejTBdGgyYxQ== X-Received: by 2002:a50:e442:: with SMTP id e2mr2991521edm.227.1556813443168; Thu, 02 May 2019 09:10:43 -0700 (PDT) Received: from localhost ([2a02:8084:20e2:c380:8cad:ae29:555d:852d]) by smtp.gmail.com with ESMTPSA id d6sm11818483edq.65.2019.05.02.09.10.41 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 02 May 2019 09:10:42 -0700 (PDT) From: "Basil L. Contovounesios" To: Eli Zaretskii Subject: Re: bug#35507: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird 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> Date: Thu, 02 May 2019 17:10:40 +0100 In-Reply-To: <83ftpwq270.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 2 May 2019 18:57:23 +0300") Message-ID: <8736lw25xb.fsf@tcd.ie> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 35507 Cc: 35507@debbugs.gnu.org, Andy Moreton X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Eli Zaretskii writes: >> 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 > >> 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: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=mm-view.diff 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 --=-=-= Content-Type: text/plain Thanks, -- Basil --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu May 02 12:30:06 2019 Received: (at 35507) by debbugs.gnu.org; 2 May 2019 16:30:06 +0000 Received: from localhost ([127.0.0.1]:46849 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMEb0-00083q-17 for submit@debbugs.gnu.org; Thu, 02 May 2019 12:30:06 -0400 Received: from mail-wm1-f43.google.com ([209.85.128.43]:53123) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMEav-00082q-6q for 35507@debbugs.gnu.org; Thu, 02 May 2019 12:30:02 -0400 Received: by mail-wm1-f43.google.com with SMTP id j13so3736282wmh.2 for <35507@debbugs.gnu.org>; Thu, 02 May 2019 09:30:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:mail-copies-to:gmane-reply-to-list :date:in-reply-to:message-id:mime-version:content-transfer-encoding; bh=M/SEi6ZVqEp3RWZ5wcee4AX3NXdSIxa78OrgqN4fXZA=; b=ZPVktbH27vNE+dsg2EffVcFCA1DluDsW/ygUT8dNv2dzR6hDeCL1JeMZeHy4AvXvSS w63qOxA0/WaLGR2TXHoPW34XW+j05gN5BtJpntZR/A0Df+/c/+TLKx/x0f9GBF8viIN2 TxXY5IxoxNiFVBY423LWrfb6aIsGGWUGu/ilfz3RXxfHJVuJVXZuvJMEFbw8Akem7Hmt uYUgqPYpzBlKR3M6TC1R6MnmAn01bSJSazPwSz7TtV4iAscNtAWTKUAOZYk/I7uayFmx jtobDJc4/TH9NYT6OpNYVPLFYqc5vlP+ckp398AMpAMC87UlywG9SxT9EsESow54iMVy V9MA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:mail-copies-to :gmane-reply-to-list:date:in-reply-to:message-id:mime-version :content-transfer-encoding; bh=M/SEi6ZVqEp3RWZ5wcee4AX3NXdSIxa78OrgqN4fXZA=; b=UtUPRijOIcyMwNGspEArk1T1m7SXkH5ubf78DWeduWBr6i3Aou52e0Vl1Uh/GERCuF cgLsbiARaABAlnIRATX+XdKnuRGdMPk3V61FaSDqnMXT8CqVKHsPXjlk6qrcHkquowaC IuQJKtKrqnv5l+udIhLsbtB/IEkhoXiWUesBH12LFK57+RaRNsRunbiBgnRK5xOSrrja WiwQfZ7/U0usU8UXF26k45kOv8I+hZwcVYqjGtKua+254aomZWH+W1CD2q/NVlHM3QgP xDx+9NynIbHNaE32YLxNEr7t3n/YV+R/sDaXhYUTiO/s12i5JV9it+zYmdI7i/42oBxL Iveg== X-Gm-Message-State: APjAAAVXuFWXCO7BkhY8YGCo3ly4y+S9LX3PXz8qG8byf34IRvghZyzA s6S7R4jBNd6zg8vtMpptf5ts/BNS X-Google-Smtp-Source: APXvYqzalDt7ToIJvcmVaiZkqdPd3cw9E++Z73xaAQXlXjcAa9NRaivc5xjACeYWiKakjqTdP2JehQ== X-Received: by 2002:a1c:7a12:: with SMTP id v18mr3103435wmc.69.1556814594753; Thu, 02 May 2019 09:29:54 -0700 (PDT) Received: from rpluim-mac ([2a01:e34:ecfc:a860:28db:83bb:e091:de10]) by smtp.gmail.com with ESMTPSA id w4sm5576410wmc.36.2019.05.02.09.29.52 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 02 May 2019 09:29:53 -0700 (PDT) From: Robert Pluim To: Eli Zaretskii Subject: Re: bug#35507: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird 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> X-Debbugs-No-Ack: yes Mail-Copies-To: never Gmane-Reply-To-List: yes Date: Thu, 02 May 2019 18:29:52 +0200 In-Reply-To: <83ftpwq270.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 02 May 2019 18:57:23 +0300") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 35507 Cc: 35507@debbugs.gnu.org, Andy Moreton X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >>>>> On Thu, 02 May 2019 18:57:23 +0300, Eli Zaretskii said: >> From: Andy Moreton Date: Thu, 02 May >> 2019 16:43:31 +0100 >>=20 >> > So yes, I think Noam is right, and 'undecided' is a better >> alternative here. >>=20 >> That is arguing for the existing code, which does not work >> correctly. Eli> No, the existing code simply uses the undecoded string. Eli> 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 That fixes things for me, thanks (I tested against Paul's original message). I don=CA=BCt see any need for it to be configurable, but that=CA=BCs up to = you. Robert From debbugs-submit-bounces@debbugs.gnu.org Thu May 02 12:50:41 2019 Received: (at 35507) by debbugs.gnu.org; 2 May 2019 16:50:41 +0000 Received: from localhost ([127.0.0.1]:46868 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMEuv-0000Bn-1E for submit@debbugs.gnu.org; Thu, 02 May 2019 12:50:41 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51131) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMEut-0000Ba-4u for 35507@debbugs.gnu.org; Thu, 02 May 2019 12:50:39 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:47549) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMEun-00078f-JD; Thu, 02 May 2019 12:50:33 -0400 Received: from [176.228.60.248] (port=3430 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hMEum-0000ga-QM; Thu, 02 May 2019 12:50:33 -0400 Date: Thu, 02 May 2019 19:50:11 +0300 Message-Id: <838svopzr0.fsf@gnu.org> From: Eli Zaretskii To: "Basil L. Contovounesios" In-reply-to: <8736lw25xb.fsf@tcd.ie> (contovob@tcd.ie) Subject: Re: bug#35507: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird 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> <8736lw25xb.fsf@tcd.ie> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 35507 Cc: 35507@debbugs.gnu.org, andrewjmoreton@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: "Basil L. Contovounesios" > Cc: Andy Moreton , <35507@debbugs.gnu.org> > Date: Thu, 02 May 2019 17:10:40 +0100 > > 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: Thanks. Would you please push that, and give credit to Noam for the suggestion? From debbugs-submit-bounces@debbugs.gnu.org Thu May 02 12:51:27 2019 Received: (at 35507) by debbugs.gnu.org; 2 May 2019 16:51:27 +0000 Received: from localhost ([127.0.0.1]:46876 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMEve-0000DP-Nv for submit@debbugs.gnu.org; Thu, 02 May 2019 12:51:26 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51271) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMEvd-0000D1-Bq for 35507@debbugs.gnu.org; Thu, 02 May 2019 12:51:25 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:47558) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMEvY-0007QD-6B; Thu, 02 May 2019 12:51:20 -0400 Received: from [176.228.60.248] (port=3478 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hMEvX-0000kC-Bf; Thu, 02 May 2019 12:51:20 -0400 Date: Thu, 02 May 2019 19:50:58 +0300 Message-Id: <837eb8pzpp.fsf@gnu.org> From: Eli Zaretskii To: Andy Moreton In-reply-to: (message from Andy Moreton on Thu, 02 May 2019 17:08:21 +0100) Subject: Re: bug#35507: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird 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> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 35507 Cc: 35507@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Andy Moreton > Date: Thu, 02 May 2019 17:08:21 +0100 > > > 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. Thanks for testing. Something according those lines will be in the repository shortly. From debbugs-submit-bounces@debbugs.gnu.org Thu May 02 12:54:01 2019 Received: (at 35507) by debbugs.gnu.org; 2 May 2019 16:54:01 +0000 Received: from localhost ([127.0.0.1]:46884 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMEy9-0000Hy-8K for submit@debbugs.gnu.org; Thu, 02 May 2019 12:54:01 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51832) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMEy6-0000Hi-7G for 35507@debbugs.gnu.org; Thu, 02 May 2019 12:53:59 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:47601) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMEy1-0000IL-0o; Thu, 02 May 2019 12:53:53 -0400 Received: from [176.228.60.248] (port=3635 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hMExz-0000tw-Vq; Thu, 02 May 2019 12:53:52 -0400 Date: Thu, 02 May 2019 19:53:31 +0300 Message-Id: <835zqspzlg.fsf@gnu.org> From: Eli Zaretskii To: Robert Pluim In-reply-to: (message from Robert Pluim on Thu, 02 May 2019 18:29:52 +0200) Subject: Re: bug#35507: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird 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; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 35507 Cc: 35507@debbugs.gnu.org, andrewjmoreton@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Robert Pluim > Cc: Andy Moreton , 35507@debbugs.gnu.org > Date: Thu, 02 May 2019 18:29:52 +0200 > > That fixes things for me, thanks (I tested against Paul's original > message). Thanks for testing. > I donʼt see any need for it to be configurable, but thatʼs up to you. No need, IMO. That's a nice bonus of Noam's idea: 'undecided' can already be configured via existing facilities, like prefer-coding-system, set-language-environment, and their ilk. From debbugs-submit-bounces@debbugs.gnu.org Thu May 02 13:13:17 2019 Received: (at 35507) by debbugs.gnu.org; 2 May 2019 17:13:17 +0000 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 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 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) From: Eric Abrahamsen To: Andy Moreton Subject: Re: bug#35507: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird 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> Date: Thu, 02 May 2019 10:13:07 -0700 In-Reply-To: (Andy Moreton's message of "Thu, 02 May 2019 17:08:21 +0100") Message-ID: <87r29gbx0c.fsf@ericabrahamsen.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 35507 Cc: 35507@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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? From debbugs-submit-bounces@debbugs.gnu.org Thu May 02 13:21:26 2019 Received: (at 35507) by debbugs.gnu.org; 2 May 2019 17:21:26 +0000 Received: from localhost ([127.0.0.1]:46928 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMFOf-00010s-UX for submit@debbugs.gnu.org; Thu, 02 May 2019 13:21:26 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57225) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMFOe-00010e-Rf for 35507@debbugs.gnu.org; Thu, 02 May 2019 13:21:25 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:47988) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMFOZ-0001rl-Fk; Thu, 02 May 2019 13:21:19 -0400 Received: from [176.228.60.248] (port=1329 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hMFOW-0003qG-S6; Thu, 02 May 2019 13:21:19 -0400 Date: Thu, 02 May 2019 20:20:49 +0300 Message-Id: <834l6cpyby.fsf@gnu.org> From: Eli Zaretskii To: contovob@tcd.ie In-reply-to: <838svopzr0.fsf@gnu.org> (message from Eli Zaretskii on Thu, 02 May 2019 19:50:11 +0300) Subject: Re: bug#35507: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird 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> <8736lw25xb.fsf@tcd.ie> <838svopzr0.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 35507 Cc: 35507@debbugs.gnu.org, andrewjmoreton@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Thu, 02 May 2019 19:50:11 +0300 > From: Eli Zaretskii > Cc: 35507@debbugs.gnu.org, andrewjmoreton@gmail.com > > give credit to Noam And to Andy, of course. Sorry, thought it was obvious, but better safe than sorry. From debbugs-submit-bounces@debbugs.gnu.org Thu May 02 13:45:46 2019 Received: (at submit) by debbugs.gnu.org; 2 May 2019 17:45:46 +0000 Received: from localhost ([127.0.0.1]:46952 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMFmD-0001ct-OD for submit@debbugs.gnu.org; Thu, 02 May 2019 13:45:45 -0400 Received: from eggs.gnu.org ([209.51.188.92]:33773) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMFmB-0001cf-Oj for submit@debbugs.gnu.org; Thu, 02 May 2019 13:45:44 -0400 Received: from lists.gnu.org ([209.51.188.17]:46365) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hMFm6-00054Y-Jo for submit@debbugs.gnu.org; Thu, 02 May 2019 13:45:38 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48148) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMFm5-0000vJ-Nn for bug-gnu-emacs@gnu.org; Thu, 02 May 2019 13:45:38 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_40,FREEMAIL_FROM, RDNS_NONE autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hMFm4-00053M-SC for bug-gnu-emacs@gnu.org; Thu, 02 May 2019 13:45:37 -0400 Received: from [195.159.176.226] (port=54628 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hMFm4-00052K-Lf for bug-gnu-emacs@gnu.org; Thu, 02 May 2019 13:45:36 -0400 Received: from list by blaine.gmane.org with local (Exim 4.89) (envelope-from ) id 1hMFm3-0003pz-2y for bug-gnu-emacs@gnu.org; Thu, 02 May 2019 19:45:35 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Andy Moreton Subject: Re: bug#35507: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird Date: Thu, 02 May 2019 18:45:30 +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> <87r29gbx0c.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: text/plain User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (windows-nt) Cancel-Lock: sha1:qPekgqVv7wOroVENw0Rr5ZgA0dI= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 195.159.176.226 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.2 (--) On Thu 02 May 2019, Eric Abrahamsen wrote: > Andy Moreton writes: >> 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? Something similar, but any test data should be anonymised so that it does not contain personal details or real email addresses. AndyM From debbugs-submit-bounces@debbugs.gnu.org Thu May 02 19:24:46 2019 Received: (at 35507) by debbugs.gnu.org; 2 May 2019 23:24:46 +0000 Received: from localhost ([127.0.0.1]:47308 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hML4I-0003Kw-1n for submit@debbugs.gnu.org; Thu, 02 May 2019 19:24:46 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:37164) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hML4E-0003Kg-Q0 for 35507@debbugs.gnu.org; Thu, 02 May 2019 19:24:44 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 1EE921618D4; Thu, 2 May 2019 16:24:36 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id hQU63Eq1s4cm; Thu, 2 May 2019 16:24:35 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 63A361618E0; Thu, 2 May 2019 16:24:35 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id jLc1VMzDr9h1; Thu, 2 May 2019 16:24:35 -0700 (PDT) Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 49BE01618D4; Thu, 2 May 2019 16:24:35 -0700 (PDT) To: Andy Moreton From: Paul Eggert Subject: Re: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird Openpgp: preference=signencrypt Autocrypt: addr=eggert@cs.ucla.edu; prefer-encrypt=mutual; keydata= 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 uNcby4U= Organization: UCLA Computer Science Department Message-ID: Date: Thu, 2 May 2019 16:24:34 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 35507 Cc: 35507@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > any test data should be anonymised so that it > does not contain personal details or real email addresses. It's OK with me if you use my original bug report as test data, as I think the only email addresses it contains are public ones like mine (already nearly 3000 copies of that in the Emacs source code!) or bug-gnu-emacs. Thanks to all for fixing this. From debbugs-submit-bounces@debbugs.gnu.org Fri May 03 09:55:50 2019 Received: (at control) by debbugs.gnu.org; 3 May 2019 13:55:50 +0000 Received: from localhost ([127.0.0.1]:49267 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMYfF-0007UT-Uy for submit@debbugs.gnu.org; Fri, 03 May 2019 09:55:50 -0400 Received: from mail-ed1-f45.google.com ([209.85.208.45]:45119) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMYfB-0007UF-N1 for control@debbugs.gnu.org; Fri, 03 May 2019 09:55:46 -0400 Received: by mail-ed1-f45.google.com with SMTP id g57so6075476edc.12 for ; Fri, 03 May 2019 06:55:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=iVA8cd9lgBQAkD4st/xOJDfEK4ffRQPHoIEUTTWc66Y=; b=CoaU9ZcpYD9ZL4vrkk2YCSP8hTP8hnjhmPuUQkUK+uEMFlAyCsQmhEnGmIr+kFci3z oxKYrw1p4MPRkO3RbN/KzXlXXNhvj5HGvOb8od518y6GkBHvPdSHvX83eJV7TwVYqpp2 b3JGRVt4+kl6ugNFy3wmtGVpsL6+sXc0T4tlOFOReS71zxKQzSrOCO2zu3HM+m8mkEJR EnErqK3tEW0zRPfhi43hDf7kTY7ACKi5eV45ANnt3FHzLSdDn1z0iL77RNItfex83t0/ GMWOO3/ANsCPgsDh5PhHafxpKxlyENy0dEmxr2TgqRiRfmK+xi1XUicjWeKjf59RggG2 zzug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=iVA8cd9lgBQAkD4st/xOJDfEK4ffRQPHoIEUTTWc66Y=; b=Fj4ab6eEfpwUjU5JQqT4UClZ+Psc0cazCMi1pMpC0n6Z3B2ptcWe8vLv31GhoNBKFP kQrffzzppc4RiJ4ifzKlWLZKcnnIIzs2pmoaIiY8EHVKSFKwvS9wYT/DSPkpkFwAL1oX T+t0dIDgMsvB7QjLReVkkaA5BtUhur9cetlTFB36xP6AxQjJHJvwM2aSo+mQYa7PsQXy ACdbU4XFKKrGAf0OAGsewvdpT1dqskL5EPtdNCs+9xItxgTk33qN5lq5VJPeK4jhkcNz Xv/Bb20tlHwJ5lfg72vxrMi6ME3jmKiQQDTWdbaKJKMXyOtUzSN6js11cnje/OSQWQ+8 7H4g== X-Gm-Message-State: APjAAAXUMZJTmJybSXMG9sUFUfamlaqIUXrKyL9+XJ2mbaKo+vPweMkd LSyAfqipTF9RYw5RNnjfuk+leg== X-Google-Smtp-Source: APXvYqyY0NkTF5p1PkRLyPo3y9EM2YsyeP5DvhaOkF2GC6Ap3/MUvS4PlmD4MnZAwYtCE53dIzpqFQ== X-Received: by 2002:a50:8682:: with SMTP id r2mr6006136eda.106.1556891739956; Fri, 03 May 2019 06:55:39 -0700 (PDT) Received: from localhost ([86.43.103.106]) by smtp.gmail.com with ESMTPSA id x30sm594315edd.74.2019.05.03.06.55.38 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 03 May 2019 06:55:38 -0700 (PDT) From: "Basil L. Contovounesios" To: Eli Zaretskii Subject: Re: bug#35507: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird 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> <8736lw25xb.fsf@tcd.ie> <838svopzr0.fsf@gnu.org> <834l6cpyby.fsf@gnu.org> Date: Fri, 03 May 2019 14:55:37 +0100 In-Reply-To: <834l6cpyby.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 2 May 2019 20:20:49 +0300") Message-ID: <87v9yrfxra.fsf@tcd.ie> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 3.6 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: tags 35507 fixed close 35507 quit Eli Zaretskii writes: >> Date: Thu, 02 May 2019 19:50:11 +0300 >> From: Eli Zaretskii >> Cc: 35507@debbugs.gnu.org, andrewjmoreton@gmail.com >> >> give credit to Noam > > And to Andy, of course. Sorry, thoug [...] Content analysis details: (3.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: gnu.org] 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [86.43.103.106 listed in zen.spamhaus.org] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.208.45 listed in list.dnswl.org] X-Debbugs-Envelope-To: control Cc: 35507-done@debbugs.gnu.org, andrewjmoreton@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.6 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: tags 35507 fixed close 35507 quit Eli Zaretskii writes: >> Date: Thu, 02 May 2019 19:50:11 +0300 >> From: Eli Zaretskii >> Cc: 35507@debbugs.gnu.org, andrewjmoreton@gmail.com >> >> give credit to Noam > > And to Andy, of course. Sorry, thoug [...] Content analysis details: (2.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: gnu.org] 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [86.43.103.106 listed in zen.spamhaus.org] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.208.45 listed in list.dnswl.org] -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager tags 35507 fixed close 35507 quit Eli Zaretskii writes: >> Date: Thu, 02 May 2019 19:50:11 +0300 >> From: Eli Zaretskii >> Cc: 35507@debbugs.gnu.org, andrewjmoreton@gmail.com >> >> give credit to Noam > > And to Andy, of course. Sorry, thought it was obvious, but better > safe than sorry. Done (hopefully without needing to be sorry): [24a1d5a0b5]: Fix Gnus inline attachment decoding (bug#35507) 2019-05-03 14:52:01 +0100 https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=24a1d5a0b5c0debd8256d71242bfa6f8448bf5af I am thus closing this report. Thanks, -- Basil From debbugs-submit-bounces@debbugs.gnu.org Fri May 03 10:02:13 2019 Received: (at 35507) by debbugs.gnu.org; 3 May 2019 14:02:13 +0000 Received: from localhost ([127.0.0.1]:49281 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMYlQ-0000wV-CZ for submit@debbugs.gnu.org; Fri, 03 May 2019 10:02:12 -0400 Received: from mail-ed1-f46.google.com ([209.85.208.46]:45848) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMYlN-0000qe-Vp for 35507@debbugs.gnu.org; Fri, 03 May 2019 10:02:10 -0400 Received: by mail-ed1-f46.google.com with SMTP id g57so6101194edc.12 for <35507@debbugs.gnu.org>; Fri, 03 May 2019 07:02:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=FE7Pqbv9IrBjl0G081dz2d48qIZgqErHWOewHhvBS3U=; b=Yfmu5156KMD9NDpiSD3grxkTcXCbH4H3L9tRnW+bP/0ShXxQyY0kTc9+h99/UJnlg3 t5dO21B9gdZu9dCsUOBIuxBlt6/mn9Rvt9pnDPffoGOermxfIfZJEfSXfqgn2bYNUpSO BXsduRMaeF1RWAsm7AQeGf23J8NKVpbZMFtBoajUZOSDmNLyxaBTQghMETFf1kuG+HRU +6IeKxNTmzgkFE+Fg9V1mHfZDGZvKYBLnwqrQKSmbIw4boZHjJZ6h6DHro/Mvd6DwZQL Hf7Z/PpYsDHkA67hVxzuExtDZ5A2SdUFVcyHEv/sZB3ztWqxnEzLeXD63YiUKErBuWai sE0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=FE7Pqbv9IrBjl0G081dz2d48qIZgqErHWOewHhvBS3U=; b=EGnsgmDgwzmfFB816aoVM9IL8WxCpPsQbNxnuGW7Rb+tvJ48MV9Deu/5S4n75Epy6Q pOGAf3qLdm+cIhNrL0cD4e5x22W85T3HKDQN7dYS8QNFOMCe7lHJfprD++8klfMcwVJT +IexKBxAB12AI5M/v22bb6ADmf2RKEl4e2zqo88G8COMBgvZI/jiyKAqZSWloylFXVPO wQQTcz+DrKXrFD9ehKoq9CiQwMPd8FtY/acTfeR9ZyXFmh1qtf8RjlXYfKMQcqApyUfM 8uBTdW1f9iuv5HIuoRQMkfYDvN/6Clsvk4aVy1zavHSKIXujlwjRKX6fhRmhpMsLctbO QMFQ== X-Gm-Message-State: APjAAAVwCeRP6q3o7y5PjH74liYFki808m7t4AaQyU8AEQPBMCR/0ptV gkI611V1N5yDL73+1/YBUpfjHA== X-Google-Smtp-Source: APXvYqzsz6sjB4adlrKdq6p72qDN4bjXLkHeI0Y020uTY38f9S5+9UEkUO+K2KI3xP3a4GY2NrQlqQ== X-Received: by 2002:a50:a305:: with SMTP id 5mr8430926edn.164.1556892124049; Fri, 03 May 2019 07:02:04 -0700 (PDT) Received: from localhost ([86.43.103.106]) by smtp.gmail.com with ESMTPSA id f8sm602138edd.15.2019.05.03.07.02.02 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 03 May 2019 07:02:03 -0700 (PDT) From: "Basil L. Contovounesios" To: Eli Zaretskii Subject: Re: bug#35507: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird 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> <87a7g5njz1.fsf@gmail.com> <83imusq2zb.fsf@gnu.org> Date: Fri, 03 May 2019 15:02:01 +0100 In-Reply-To: <83imusq2zb.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 2 May 2019 18:40:24 +0300") Message-ID: <87pnozfxgm.fsf@tcd.ie> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 3.6 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Eli Zaretskii writes: >> From: Noam Postavsky >> Date: Thu, 02 May 2019 08:01:38 -0400 >> Cc: 35507@debbugs.gnu.org >> >> I understood from Paul's followup in https://debbugs.gnu.org/35507#32 >> that t [...] Content analysis details: (3.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: gnu.org] 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [86.43.103.106 listed in zen.spamhaus.org] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.208.46 listed in list.dnswl.org] X-Debbugs-Envelope-To: 35507 Cc: 35507@debbugs.gnu.org, andrewjmoreton@gmail.com, Noam Postavsky X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.6 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Eli Zaretskii writes: >> From: Noam Postavsky >> Date: Thu, 02 May 2019 08:01:38 -0400 >> Cc: 35507@debbugs.gnu.org >> >> I understood from Paul's followup in https://debbugs.gnu.org/35507#32 >> that t [...] Content analysis details: (2.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: gnu.org] 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [86.43.103.106 listed in zen.spamhaus.org] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.208.46 listed in list.dnswl.org] -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager Eli Zaretskii writes: >> From: Noam Postavsky >> Date: Thu, 02 May 2019 08:01:38 -0400 >> Cc: 35507@debbugs.gnu.org >> >> I understood from Paul's followup in https://debbugs.gnu.org/35507#32 >> that the report is mainly about the case where there is a Content-Type >> header with a charset field within the body of the attachment. > > Yes, that's my understanding as well. So I guess Gnus should try > gleaning the charset from there. The 'undecided' stuff is for when it > fails, I think. Question following an initial reading of (info "(elisp) Coding System Basics"): would it be better in this case to use prefer-utf-8 instead of undecided? If not, why not? Thanks, -- Basil From debbugs-submit-bounces@debbugs.gnu.org Fri May 03 11:15:15 2019 Received: (at 35507) by debbugs.gnu.org; 3 May 2019 15:15:15 +0000 Received: from localhost ([127.0.0.1]:49329 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMZu7-0002zV-0M for submit@debbugs.gnu.org; Fri, 03 May 2019 11:15:15 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43335) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMZu3-0002yy-8Y for 35507@debbugs.gnu.org; Fri, 03 May 2019 11:15:11 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:50542) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMZtv-0003Yg-KE; Fri, 03 May 2019 11:15:04 -0400 Received: from [176.228.60.248] (port=2661 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hMZtr-0006hT-Ga; Fri, 03 May 2019 11:15:03 -0400 Date: Fri, 03 May 2019 18:14:32 +0300 Message-Id: <83k1f7muxz.fsf@gnu.org> From: Eli Zaretskii To: "Basil L. Contovounesios" In-reply-to: <87pnozfxgm.fsf@tcd.ie> (contovob@tcd.ie) Subject: Re: bug#35507: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird 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> <87a7g5njz1.fsf@gmail.com> <83imusq2zb.fsf@gnu.org> <87pnozfxgm.fsf@tcd.ie> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 35507 Cc: 35507@debbugs.gnu.org, andrewjmoreton@gmail.com, npostavs@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: "Basil L. Contovounesios" > Cc: Noam Postavsky , <35507@debbugs.gnu.org>, > Date: Fri, 03 May 2019 15:02:01 +0100 > > Question following an initial reading of (info "(elisp) Coding System > Basics"): would it be better in this case to use prefer-utf-8 instead of > undecided? If not, why not? Because we have no reason to prefer UTF-8 in this case. No one tells us that x-patch will be predominantly encoded in UTF-8. The RFC doesn't say that UTF-8 is the default, either, and text/x-patch is not defined anywhere with that default. Which means there's no default, and in that case 'undecided' is better, because it heeds to the preferences of the user. From debbugs-submit-bounces@debbugs.gnu.org Fri May 03 11:20:32 2019 Received: (at 35507) by debbugs.gnu.org; 3 May 2019 15:20:32 +0000 Received: from localhost ([127.0.0.1]:49335 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMZzD-000372-PP for submit@debbugs.gnu.org; Fri, 03 May 2019 11:20:32 -0400 Received: from mail-ed1-f53.google.com ([209.85.208.53]:34124) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMZz9-00036n-M3 for 35507@debbugs.gnu.org; Fri, 03 May 2019 11:20:28 -0400 Received: by mail-ed1-f53.google.com with SMTP id w35so4772459edd.1 for <35507@debbugs.gnu.org>; Fri, 03 May 2019 08:20:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=AZ3iRXSsvBP6RbwhktcT40Pam3e6KXO9ikQ7iSRjLWY=; b=A+R7UklPBHPbYgFJemnLnnFFR1U0051e4M7ohrPKeG2wpKmHlzldvW3cU1gF6JNhea eCdTI6H59BXBZ5ephB7efcrKe8v14xj2Wx7tcE3ysv8FqhXGJQiuQOr1u3yEAN1j3sTH FMV0D+g+rpcC7Yb+j4EnZvguJheVxYkieAplhcQoAbK8SOtrEtruHmupBBIcOQHRsrD3 kNzOcVf0K/eJjDA0bgQ4rk6ppdBh6+fLQE0y4SthIrDg91rWbk2eZFgHD03l2RdeBprS 1+nKJ0u7r4HOYyprBjkV/Po8/Xs7mGDQkzWTvQcyVulgNMiOQ9zI9qVYze34tbzaypEX HBuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=AZ3iRXSsvBP6RbwhktcT40Pam3e6KXO9ikQ7iSRjLWY=; b=F+AzKUx0xYgsQ2vtUY7EtrnKbFBMRN34dIFuj0RwmBm5Ullt+IIvMv7aVSwZFXPjnX kVySY4ly44/34H3Dkmuof3+0xfjCJu4xb1He3vx3T3wTZ7PGkKnUnMfranntWfOidoe2 gI9vdjU6Hla5u13rb7P6VSV1F5l7x7mp4rG526JQFBqe+RnFsMBtwt4557gL6O0LxgUB al8bYELDESbWQakEbKELIUt4kL785yS6y0pzp4YdC67Z8205NqbOCfGTthFTXrTtXuMD vosuWZ4+Ohu70qfLmBNstEt1jjEVK7MxOCM3Ep5Y7raqgNUhPcjstpqBW6X3PP5hbI59 EPIQ== X-Gm-Message-State: APjAAAUrK8f0LKgDIZ+l994og1Wmw/0o8luqVf4haaCChOfNueezVjOM ut4AsFXHOiSDY0YUwpvMHEO6sA== X-Google-Smtp-Source: APXvYqwj3WKdhFO7Q3JGnfxfGrFyhXEmayHvEArb8ZKXerNUkjXxabkKE7NbP2FZaF+nnuWoZYdV6w== X-Received: by 2002:a50:b062:: with SMTP id i89mr9163481edd.85.1556896821862; Fri, 03 May 2019 08:20:21 -0700 (PDT) Received: from localhost ([89.101.223.218]) by smtp.gmail.com with ESMTPSA id g32sm635206ede.88.2019.05.03.08.20.20 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 03 May 2019 08:20:21 -0700 (PDT) From: "Basil L. Contovounesios" To: Eli Zaretskii Subject: Re: bug#35507: Gnus mojibakifies UTF-8 text/x-patch attachments from Thunderbird 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> <87a7g5njz1.fsf@gmail.com> <83imusq2zb.fsf@gnu.org> <87pnozfxgm.fsf@tcd.ie> <83k1f7muxz.fsf@gnu.org> Date: Fri, 03 May 2019 16:20:19 +0100 In-Reply-To: <83k1f7muxz.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 3 May 2019 18:14:32 +0300") Message-ID: <87bm0jef9o.fsf@tcd.ie> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 35507 Cc: 35507@debbugs.gnu.org, andrewjmoreton@gmail.com, npostavs@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> From: "Basil L. Contovounesios" >> Cc: Noam Postavsky , <35507@debbugs.gnu.org>, >> Date: Fri, 03 May 2019 15:02:01 +0100 >> >> Question following an initial reading of (info "(elisp) Coding System >> Basics"): would it be better in this case to use prefer-utf-8 instead of >> undecided? If not, why not? > > Because we have no reason to prefer UTF-8 in this case. No one tells > us that x-patch will be predominantly encoded in UTF-8. > > The RFC doesn't say that UTF-8 is the default, either, and > text/x-patch is not defined anywhere with that default. Which means > there's no default, and in that case 'undecided' is better, because it > heeds to the preferences of the user. Right, thanks for explaining. -- Basil From unknown Tue Aug 19 23:15:52 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 01 Jun 2019 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator