GNU bug report logs - #19985
active locale impacts binary data detection?

Previous Next

Package: grep;

Reported by: Mike Frysinger <vapier <at> gentoo.org>

Date: Tue, 3 Mar 2015 02:01:01 UTC

Severity: normal

Merged with 19230, 20526, 21558

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: bug-grep <at> gnu.org, proteuss <at> sdf.lonestar.org
Subject: Re: bug#19985: active locale impacts binary data detection?
Date: Mon, 02 Mar 2015 18:31:27 -0800
The new behavior is expected, and this is mentioned in the NEWS file:

  If a file contains data improperly encoded for the current locale,
  and this is discovered before any of the file's contents are output,
  grep now treats the file as binary.

In some cases one can get the old behavior with 'grep -a'.

This is not the first time the problem has been reported.  Please see:

http://bugs.gnu.org/19230

If the problem occurs often enough, perhaps we should change grep's behavior. 
For example, perhaps grep should fall back on the C locale if the first part of 
a file contains an encoding error but no NUL bytes.




This bug report was last modified 9 years and 139 days ago.

Previous Next


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