From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#43351: 27.1; [PATCH] Change ASCII handling in mm-charset-to-coding-system to us-ascii Date: Sat, 12 Sep 2020 16:13:43 +0200 Message-ID: <87pn6r13s8.fsf@gnus.org> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29855"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 43351@debbugs.gnu.org To: Alex Bochannek Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 12 16:15:11 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kH6J4-0007ZM-Er for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 12 Sep 2020 16:15:10 +0200 Original-Received: from localhost ([::1]:35368 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kH6J3-0005li-Gf for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 12 Sep 2020 10:15:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59412) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kH6Ix-0005lS-0H for bug-gnu-emacs@gnu.org; Sat, 12 Sep 2020 10:15:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37011) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kH6Iw-00032J-Mp for bug-gnu-emacs@gnu.org; Sat, 12 Sep 2020 10:15:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kH6Iw-0003T3-Ha for bug-gnu-emacs@gnu.org; Sat, 12 Sep 2020 10:15:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 12 Sep 2020 14:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43351 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 43351-submit@debbugs.gnu.org id=B43351.159992004613250 (code B ref 43351); Sat, 12 Sep 2020 14:15:02 +0000 Original-Received: (at 43351) by debbugs.gnu.org; 12 Sep 2020 14:14:06 +0000 Original-Received: from localhost ([127.0.0.1]:48557 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kH6I1-0003Rd-Vb for submit@debbugs.gnu.org; Sat, 12 Sep 2020 10:14:06 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:34358) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kH6Ht-0003Qu-91 for 43351@debbugs.gnu.org; Sat, 12 Sep 2020 10:14:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=sBloSJSoFJYNTK/K/GdJGQ6KydIvE4SFSXTDlxG2Nr8=; b=lfkF/hONWALuO33CrqsAWxy/Jx pOlA9EnWAqKhb2/dP6AoaN0DTeNc/sWF+XEYliZY05S3z2oW+MVSsBJphMPivHrZjxE8SsGDzYEMm jR5mSTbSur+4zIzK8oF+rtdWOeH3Ue/wIyNkk9CqnuK6aFXmslgQl6GtttY3wIsPa7f0=; Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kH6Hh-0007Gv-3W; Sat, 12 Sep 2020 16:13:50 +0200 X-Now-Playing: Joni Mitchell's _For The Roses_: "Woman OF Heart And Mind" In-Reply-To: (Alex Bochannek's message of "Sat, 12 Sep 2020 00:04:15 -0700") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:187897 Archived-At: Alex Bochannek writes: > This is a very small patch, but I am not confident that there aren't > other side effects, so please evaluate it carefully. The patch makes sense conceptually, but it can't be applied because there's code (presumably) all over the place that depends on it returning `ascii'. For instance: (let ((cs (mm-charset-to-coding-system charset nil allow-override))) (cond ((eq cs 'ascii) (setq cs (or (mm-charset-to-coding-system mail-parse-charset) 'raw-text))) > In the fix for bug#5458 (2011-06-30), a change was made to > mm-charset-to-coding-system to support "ansi.x3.4*" as an alias for > 'ascii. As part of that patch 'us-ascii was also mapped to 'ascii. This > is problematic because decode-coding-string does not recognize 'ascii as > a coding system and throws an "Invalid coding system: ascii" exception. Indeed; ascii isn't a valid coding system... but poking around here, I think the function (despite its name) isn't really returning a coding system. I mean, it does in most cases, but not for ascii. :-/ (The doc string of the function should be fixed.) > As a result, when using gnus-article-browse-html-article (K H) to > display a text/html message that has charset=us-ascii (or presumably > also charset=ascii), the display will fail iff the header of the message > is not ASCII. I think this has to be changed in gnus-article-browse-html-article instead, unfortunately. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no