GNU bug report logs - #28306
grep: option to filter non-printable characters from contents

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: grep; Reported by: "Santiago R.R." <santiagorr@HIDDEN>; dated Thu, 31 Aug 2017 15:39:02 UTC; Maintainer for grep is bug-grep@HIDDEN.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 31 Aug 2017 15:38:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Aug 31 11:38:39 2017
Received: from localhost ([127.0.0.1]:37734 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1dnRYE-00064a-Ta
	for submit <at> 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 <santiagorr@HIDDEN>) id 1dnRYD-00064H-GT
 for submit <at> 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 <santiagorr@HIDDEN>) id 1dnRY7-0006a6-I3
 for submit <at> 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 <santiagorr@HIDDEN>)
 id 1dnRY7-0006Zy-EB
 for submit <at> 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 <santiagorr@HIDDEN>) id 1dnRY5-0004Mg-V7
 for bug-grep@HIDDEN; Thu, 31 Aug 2017 11:38:31 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <santiagorr@HIDDEN>) id 1dnRY2-0006XC-S4
 for bug-grep@HIDDEN; 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 <santiagorr@HIDDEN>)
 id 1dnRY2-0006WZ-KD
 for bug-grep@HIDDEN; 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@HIDDEN) by (piha) 
 with ESMTPSA id 11FDB1E2148
Date: Thu, 31 Aug 2017 17:38:19 +0200
From: "Santiago R.R." <santiagorr@HIDDEN>
To: bug-grep@HIDDEN
Subject: grep: option to filter non-printable characters from contents
Message-ID: <20170831153819.cutjqth5owa6ocqw@HIDDEN>
References: <20080909090733.GA20478@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
In-Reply-To: <20080909090733.GA20478@HIDDEN>
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@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
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 <vincent@HIDDEN> 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




Acknowledgement sent to "Santiago R.R." <santiagorr@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-grep@HIDDEN. Full text available.
Report forwarded to bug-grep@HIDDEN:
bug#28306; Package grep. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Thu, 31 Aug 2017 15:45:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.