From unknown Thu Aug 14 12:21:28 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#28306 <28306@debbugs.gnu.org> To: bug#28306 <28306@debbugs.gnu.org> Subject: Status: grep: option to filter non-printable characters from contents Reply-To: bug#28306 <28306@debbugs.gnu.org> Date: Thu, 14 Aug 2025 19:21:28 +0000 retitle 28306 grep: option to filter non-printable characters from contents reassign 28306 grep submitter 28306 "Santiago R.R." severity 28306 wishlist thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 31 11:38:39 2017 Received: (at submit) by debbugs.gnu.org; 31 Aug 2017 15:38:39 +0000 Received: from localhost ([127.0.0.1]:37734 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dnRYE-00064a-Ta for submit@debbugs.gnu.org; Thu, 31 Aug 2017 11:38:39 -0400 Received: from eggs.gnu.org ([208.118.235.92]:47009) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dnRYD-00064H-GT for submit@debbugs.gnu.org; Thu, 31 Aug 2017 11:38:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dnRY7-0006a6-I3 for submit@debbugs.gnu.org; Thu, 31 Aug 2017 11:38:32 -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.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:34830) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dnRY7-0006Zy-EB for submit@debbugs.gnu.org; Thu, 31 Aug 2017 11:38:31 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37971) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dnRY5-0004Mg-V7 for bug-grep@gnu.org; Thu, 31 Aug 2017 11:38:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dnRY2-0006XC-S4 for bug-grep@gnu.org; Thu, 31 Aug 2017 11:38:30 -0400 Received: from mx1.riseup.net ([198.252.153.129]:33527) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dnRY2-0006WZ-KD for bug-grep@gnu.org; Thu, 31 Aug 2017 11:38:26 -0400 Received: from piha.riseup.net (unknown [10.0.1.163]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.riseup.net (Postfix) with ESMTPS id BB0F21A2401; Thu, 31 Aug 2017 15:38:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1504193904; bh=3c3mUp/60IBOCzVyZYkgernyLlpXUaBuAwubBD/pXS8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=V+9skyoZEUmbNipiWNveQhgHX0/6t7Z+YYRYrY7zP6vqJKGQZB++XvpoYQVXCc7DH GcuLvI8aIX+2q4tCuQcUhp0OlcPLpEyo+LZAo4+5L4O7jZD+7CYL28+G/Nchcr3dXu FoZIzdesnoL/5jiwsbh9H1CsYQ/MZdIe6PwDtsBU= Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: santiagorr@riseup.net) by (piha) with ESMTPSA id 11FDB1E2148 Date: Thu, 31 Aug 2017 17:38:19 +0200 From: "Santiago R.R." To: bug-grep@gnu.org Subject: grep: option to filter non-printable characters from contents Message-ID: <20170831153819.cutjqth5owa6ocqw@riseup.net> References: <20080909090733.GA20478@vin.lip.ens-lyon.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20080909090733.GA20478@vin.lip.ens-lyon.fr> Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [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.1 (----) X-Debbugs-Envelope-To: submit Cc: 498336@bugs.debian.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.1 (----) Dear grep upstream authors, I'd like to forward this bug reported to debian https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=3D498336 On Tue, 9 Sep 2008 11:07:33 +0200 Vincent Lefevre wr= ote: =E2=80=A6 >=20 > grep should have an option to filter non-printable characters from > the contents (file contents, but also filenames -- see bug #42630) > *before coloring*. The values could be "never", "always" and "auto", > like with --color. >=20 > Such an option would be useful because: >=20 > 1. The option --binary-files is a heuristic only; the user may want > to have more information on binary files anyway. >=20 > 2. It is not even possible to write a wrapper script when coloring is > used, because after coloring, it is not possible (or at least very > difficult) to do the difference between escape sequences from grep > and those from the original contents. >=20 > Such non-printable characters could be either replaced by some > locale-specific replacement character or transcoded. >=20 > I wonder whether filtering should be the default when the output > is connected to a terminal (and when POSIXLY_CORRECT is not set). > It would not be worse than the default --binary-files=3Dbinary. =E2=80=A6 This option could be also useful to filter undesirable behaviors, such as ringing the bell terminal (from stdin in this case): printf '\a'x | grep x What's your position on this? Thanks, -- Santiago PS. As Vincent Lefevre says, this bug relates to filtering non-printable characters from filenames: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=3D42630 From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 31 20:30:36 2017 Received: (at 28306) by debbugs.gnu.org; 1 Sep 2017 00:30:36 +0000 Received: from localhost ([127.0.0.1]:38416 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dnZr1-0007SJ-Sk for submit@debbugs.gnu.org; Thu, 31 Aug 2017 20:30:36 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:32894) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dnZqz-0007S3-NL for 28306@debbugs.gnu.org; Thu, 31 Aug 2017 20:30:34 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 9109616095A; Thu, 31 Aug 2017 17:30:27 -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 5atWaBpgGfMt; Thu, 31 Aug 2017 17:30:26 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id B521A160968; Thu, 31 Aug 2017 17:30:26 -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 PTJo4eChFflB; Thu, 31 Aug 2017 17:30:26 -0700 (PDT) Received: from [192.168.1.9] (unknown [47.153.184.153]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 70876160080; Thu, 31 Aug 2017 17:30:26 -0700 (PDT) Subject: Re: bug#28306: grep: option to filter non-printable characters from contents To: "Santiago R.R." , 28306@debbugs.gnu.org References: <20080909090733.GA20478@vin.lip.ens-lyon.fr> <20170831153819.cutjqth5owa6ocqw@riseup.net> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: Date: Thu, 31 Aug 2017 17:30:26 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170831153819.cutjqth5owa6ocqw@riseup.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 28306 Cc: 498336@bugs.debian.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: -2.3 (--) Santiago R.R. wrote: > What's your position on this? Sounds like a reasonable option, though I think I might make it another form of coloring rather than a separate option. From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 31 14:48:13 2019 Received: (at control) by debbugs.gnu.org; 31 Dec 2019 19:48:14 +0000 Received: from localhost ([127.0.0.1]:35181 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1imNUz-0003g4-PB for submit@debbugs.gnu.org; Tue, 31 Dec 2019 14:48:13 -0500 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:41580) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1imNUy-0003fo-EL for control@debbugs.gnu.org; Tue, 31 Dec 2019 14:48:12 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 14B6B16027C for ; Tue, 31 Dec 2019 11:48:07 -0800 (PST) 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 1sYs1smuKqjS for ; Tue, 31 Dec 2019 11:48:06 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 79B7816027E for ; Tue, 31 Dec 2019 11:48:06 -0800 (PST) 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 BqcxwX9qc2BK for ; Tue, 31 Dec 2019 11:48:06 -0800 (PST) Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com [23.242.74.103]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 5C9E716027C for ; Tue, 31 Dec 2019 11:48:06 -0800 (PST) To: control@debbugs.gnu.org From: Paul Eggert Subject: 28306 is wishlist Organization: UCLA Computer Science Department Message-ID: Date: Tue, 31 Dec 2019 11:48:06 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) 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: -3.3 (---) severity 28306 wishlist