From unknown Sat Aug 09 13:00:25 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#25420 <25420@debbugs.gnu.org> To: bug#25420 <25420@debbugs.gnu.org> Subject: Status: Unknown encoding 8bit;; defaulting to 8bit Reply-To: bug#25420 <25420@debbugs.gnu.org> Date: Sat, 09 Aug 2025 20:00:25 +0000 retitle 25420 Unknown encoding 8bit;; defaulting to 8bit reassign 25420 emacs submitter 25420 =E7=A9=8D=E4=B8=B9=E5=B0=BC Dan Jacobson severity 25420 minor thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 11 11:45:04 2017 Received: (at submit) by debbugs.gnu.org; 11 Jan 2017 16:45:05 +0000 Received: from localhost ([127.0.0.1]:50100 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cRM1I-0007c0-Mk for submit@debbugs.gnu.org; Wed, 11 Jan 2017 11:45:04 -0500 Received: from eggs.gnu.org ([208.118.235.92]:33099) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cRM1H-0007Xp-F5 for submit@debbugs.gnu.org; Wed, 11 Jan 2017 11:45:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cRM1B-0005S4-EU for submit@debbugs.gnu.org; Wed, 11 Jan 2017 11:44:58 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: * X-Spam-Status: No, score=1.3 required=5.0 tests=BAYES_50,RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:53438) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cRM1B-0005Rz-BE for submit@debbugs.gnu.org; Wed, 11 Jan 2017 11:44:57 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52293) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cRM1A-0004Sw-63 for bug-gnu-emacs@gnu.org; Wed, 11 Jan 2017 11:44:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cRM15-0005Nd-1X for bug-gnu-emacs@gnu.org; Wed, 11 Jan 2017 11:44:56 -0500 Received: from homie.mail.dreamhost.com ([208.97.132.208]:33509 helo=homiemail-a61.g.dreamhost.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cRM14-0005N3-Ri for bug-gnu-emacs@gnu.org; Wed, 11 Jan 2017 11:44:50 -0500 Received: from homiemail-a61.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a61.g.dreamhost.com (Postfix) with ESMTP id E90F8578077; Wed, 11 Jan 2017 08:44:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=jidanni.org; h=from:to:cc :subject:references:date:message-id:mime-version:content-type: content-transfer-encoding; s=jidanni.org; bh=1FRwtp0pLfhlWS8/yJg 56L4c5rc=; b=j9yyVTIJyonf6pRm/ZgqWvu7k0n4ZxikFl71AIKb1XbC7rHMbF8 lQGZnSby4eHy1h0XBieQ0pJR9P2Q9P5hGV3N1vM6L0LwWhTv8e3OE6KVVL7TuCfC rHy6r8QbCn8C0i8GuGwZBzmzNTIdMje1hdo+inIDXn5Yn+JGCQeZhUQE= Received: from jidanni.org (114-41-5-173.dynamic.hinet.net [114.41.5.173]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: jidanni@jidanni.org) by homiemail-a61.g.dreamhost.com (Postfix) with ESMTPSA id 26F8957807D; Wed, 11 Jan 2017 08:44:47 -0800 (PST) From: =?utf-8?B?56mN5Li55bC8?= Dan Jacobson To: Katsumi Yamaoka Subject: Unknown encoding 8bit;; defaulting to 8bit References: <87vatpx9aq.fsf@jidanni.org> Date: Thu, 12 Jan 2017 00:44:28 +0800 Message-ID: <87mvexzgur.fsf@jidanni.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.5 (----) X-Debbugs-Envelope-To: submit Cc: bug-gnu-emacs@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: -4.5 (----) OK I'm sending it to them. Dear bug-gnu-emacs: >>>>> "KY" =3D=3D Katsumi Yamaoka writes: KY> On Wed, 11 Jan 2017 08:39:21 +0800, =E7=A9=8D=E4=B8=B9=E5=B0=BC=E3=81= =95=E3=82=93 wrote: >> [1. application/gzip; smsc.cpio.gz]... KY> Thanks. I could reproduce the problem; a workaround is below. KY> Feel free to forward this reply to the Emacs bug list or other. KY> (defadvice ietf-drums-strip (after remove-garbage activate) KY> "Remove garbage." KY> (let ((regexp (concat "[" ietf-drums-tspecials "]+"))) KY> (while (string-match regexp ad-return-value) KY> (setq ad-return-value KY> (concat (substring ad-return-value 0 (match-beginning 0)) KY> (substring ad-return-value (match-end 0))))))) KY> A mail that contains this header KY> Content-Transfer-Encoding: 8bit; KY> causes Gnus to issue the following warning: KY> Unknown encoding 8bit;; defaulting to 8bit KY> This means that Gnus doesn't know the encoding method named: KY> 8bit; KY> Note that this is not "8bit", but "8bit;". This is due to a bug KY> of a certain mail software. Gnus does no bad. But it is easy KY> and harmless to make Gnus fix it, so, I think we had better do KY> something like the above workaround if it generally happens. KY> I'm not quite sure whether using `ietf-drums-tspecials' is the KY> right choice, though. From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 11 19:07:57 2017 Received: (at 25420) by debbugs.gnu.org; 12 Jan 2017 00:07:57 +0000 Received: from localhost ([127.0.0.1]:50561 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cRSvs-0005Ad-V1 for submit@debbugs.gnu.org; Wed, 11 Jan 2017 19:07:57 -0500 Received: from mail-hampton.hostforweb.net ([205.234.186.191]:42611 helo=hampton.hostforweb.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cRSvr-0005AP-HC for 25420@debbugs.gnu.org; Wed, 11 Jan 2017 19:07:55 -0500 Received: from s70.gtokyofl21.vectant.ne.jp ([202.215.75.70]:60000 helo=localhost) by hampton.hostforweb.net with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.87) (envelope-from ) id 1cRSvj-000IvO-R6; Wed, 11 Jan 2017 18:07:49 -0600 Date: Thu, 12 Jan 2017 09:07:43 +0900 Message-ID: From: Katsumi Yamaoka To: 25420@debbugs.gnu.org Subject: Re: bug#25420: Unknown encoding 8bit;; defaulting to 8bit References: <87vatpx9aq.fsf@jidanni.org> <87mvexzgur.fsf@jidanni.org> Organization: Emacsen advocacy group X-Face: #kKnN,xUnmKia.'[pp`; Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu; B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (i686-pc-cygwin) Cancel-Lock: sha1:nbQPrVrjgubm1e7U1OuiFoYLMao= MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-OutGoing-Spam-Status: No, score=-2.9 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - hampton.hostforweb.net X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - jpl.org X-Get-Message-Sender-Via: hampton.hostforweb.net: authenticated_id: yamaoka/from_h X-Authenticated-Sender: hampton.hostforweb.net: yamaoka@jpl.org X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 25420 Cc: =?utf-8?B?56mN5Li55bC8?= Dan Jacobson 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: -0.7 (/) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Thu, 12 Jan 2017 00:44:28 +0800, =E7=A9=8D=E4=B8=B9=E5=B0=BC Dan Jacobso= n wrote: > A mail that contains this header > Content-Transfer-Encoding: 8bit; > causes Gnus to issue the following warning: > Unknown encoding 8bit;; defaulting to 8bit > This means that Gnus doesn't know the encoding method named: > 8bit; > Note that this is not "8bit", but "8bit;". I found it in a mail that Dan Jacobson sent to me as an example. > This is due to a bug of a certain mail software. Gnus does no bad. > But it is easy and harmless to make Gnus fix it, so, I think we had > better do something like the above workaround if it generally happens. A partial[1] patch is below. `ietf-drums-strip' is an aliasee of `mail-header-strip' that the following modules use in Emacs: lisp/gnus/gnus-art.el lisp/gnus/gnus-sum.el lisp/gnus/mm-decode.el lisp/gnus/nndoc.el lisp/mh-e/mh-mime.el The purpose of it is all to clean up a string value of the Content-Transfer-Encoding header of a mail. So, we can make `ietf-drums-strip' remove some garbage, such as ";", in addition to comments and whitespace. However, other programs outside of Emacs might be using it for different purposes. This is why I added the new function `mail-header-strip-cte' that is assumed to be exclusively used for cleaning up C-T-E string. [1] When I install the patch, I will replace `mail-header-strip' in the modules listed above with `mail-header-strip-cte' as well. Regards, --=-=-= Content-Type: text/x-patch Content-Disposition: inline --- lisp/mail/ietf-drums.el~ 2017-01-04 22:16:46 +0000 +++ lisp/mail/ietf-drums.el 2017-01-11 23:18:33 +0000 @@ -171,8 +171,21 @@ (defun ietf-drums-strip (string) "Remove comments and whitespace from STRING." (ietf-drums-remove-whitespace (ietf-drums-remove-comments string))) +(defun ietf-drums-remove-garbage (string) + "Remove some gabage from STRING." + (while (string-match "[][()<>@,;:\\\"/?=]+" string) + (setq string (concat (substring string 0 (match-beginning 0)) + (substring string (match-end 0))))) + string) + +(defun ietf-drums-strip-cte (string) + "Remove comments, whitespace and gabage from STRING. +STRING is assumed to be a string that is extracted from +the Content-Transfer-Encoding header of a mail." + (ietf-drums-remove-garbage (inline (ietf-drums-strip string)))) + (defun ietf-drums-parse-address (string) "Parse STRING and return a MAILBOX / DISPLAY-NAME pair." (with-temp-buffer (let (display-name mailbox c display-string) --- lisp/mail/mail-parse.el~ 2017-01-04 22:16:46 +0000 +++ lisp/mail/mail-parse.el 2017-01-11 23:13:51 +0000 @@ -51,2 +51,3 @@ (defalias 'mail-header-strip 'ietf-drums-strip) +(defalias 'mail-header-strip-cte 'ietf-drums-strip-cte) (defalias 'mail-header-get-comment 'ietf-drums-get-comment) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 12 18:51:22 2017 Received: (at 25420) by debbugs.gnu.org; 12 Jan 2017 23:51:22 +0000 Received: from localhost ([127.0.0.1]:51876 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cRp9O-0008Ib-0w for submit@debbugs.gnu.org; Thu, 12 Jan 2017 18:51:22 -0500 Received: from mail-hampton.hostforweb.net ([205.234.186.191]:35188 helo=hampton.hostforweb.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cRp9M-0008IO-FV for 25420@debbugs.gnu.org; Thu, 12 Jan 2017 18:51:20 -0500 Received: from s70.gtokyofl21.vectant.ne.jp ([202.215.75.70]:60000 helo=localhost) by hampton.hostforweb.net with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.87) (envelope-from ) id 1cRp9E-004CKj-1B; Thu, 12 Jan 2017 17:51:13 -0600 Date: Fri, 13 Jan 2017 08:51:09 +0900 Message-ID: From: Katsumi Yamaoka To: 25420@debbugs.gnu.org Subject: Re: bug#25420: Unknown encoding 8bit;; defaulting to 8bit References: <87vatpx9aq.fsf@jidanni.org> <87mvexzgur.fsf@jidanni.org> Organization: Emacsen advocacy group X-Face: #kKnN,xUnmKia.'[pp`; Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu; B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (i686-pc-cygwin) Cancel-Lock: sha1:EhYNedRbx39BUbMMrJXYAQZjaNU= MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-OutGoing-Spam-Status: No, score=-2.9 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - hampton.hostforweb.net X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - jpl.org X-Get-Message-Sender-Via: hampton.hostforweb.net: authenticated_id: yamaoka/from_h X-Authenticated-Sender: hampton.hostforweb.net: yamaoka@jpl.org X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 25420 Cc: =?utf-8?B?56mN5Li55bC8?= Dan Jacobson 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: -0.7 (/) On Thu, 12 Jan 2017 09:07:43 +0900, Katsumi Yamaoka wrote: > On Thu, 12 Jan 2017 00:44:28 +0800, =E7=A9=8D=E4=B8=B9=E5=B0=BC Dan Jacob= son wrote: >> A mail that contains this header >> Content-Transfer-Encoding: 8bit; >> causes Gnus to issue the following warning: >> Unknown encoding 8bit;; defaulting to 8bit >> This means that Gnus doesn't know the encoding method named: >> 8bit; >> Note that this is not "8bit", but "8bit;". [...] > A partial[1] patch is below. Installed: From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 13 03:25:42 2017 Received: (at control) by debbugs.gnu.org; 13 Jan 2017 08:25:42 +0000 Received: from localhost ([127.0.0.1]:52052 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cRxB7-0000qw-UA for submit@debbugs.gnu.org; Fri, 13 Jan 2017 03:25:42 -0500 Received: from mail-hampton.hostforweb.net ([205.234.186.191]:54472 helo=hampton.hostforweb.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cRxB6-0000qh-M7 for control@debbugs.gnu.org; Fri, 13 Jan 2017 03:25:40 -0500 Received: from s70.gtokyofl21.vectant.ne.jp ([202.215.75.70]:60000 helo=localhost) by hampton.hostforweb.net with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.87) (envelope-from ) id 1cRxAy-0000ix-1Z; Fri, 13 Jan 2017 02:25:32 -0600 Date: Fri, 13 Jan 2017 17:25:30 +0900 Message-ID: From: Katsumi Yamaoka To: control@debbugs.gnu.org Subject: Re: bug#25420: Unknown encoding 8bit;; defaulting to 8bit References: <87vatpx9aq.fsf@jidanni.org> <87mvexzgur.fsf@jidanni.org> Organization: Emacsen advocacy group User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (i686-pc-cygwin) Cancel-Lock: sha1:GUZ6+6kiJBpng+q0gCy9ZXP2xh8= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - hampton.hostforweb.net X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - jpl.org X-Get-Message-Sender-Via: hampton.hostforweb.net: authenticated_id: yamaoka/from_h X-Authenticated-Sender: hampton.hostforweb.net: yamaoka@jpl.org X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: control 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: -0.7 (/) close 25420 quit From unknown Sat Aug 09 13:00:25 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 10 Feb 2017 12:24:03 +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