GNU bug report logs - #20526
BUG: text file is detected as binary

Previous Next

Package: grep;

Reported by: Sebastian Poehn <sebastian.poehn <at> gmail.com>

Date: Thu, 7 May 2015 15:41:03 UTC

Severity: normal

Merged with 19230, 19985, 21558

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

Bug is archived. No further changes may be made.

Full log


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

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Sebastian Poehn <sebastian.poehn <at> gmail.com>
Cc: Eric Blake <eblake <at> redhat.com>, 20526 <at> debbugs.gnu.org
Subject: Re: bug#20526: BUG: text file is detected as binary
Date: Fri, 08 May 2015 09:27:45 -0700
Sebastian Poehn wrote:
> They changed all Makefiles not being ASCII
> to UTF-8 three months ago as they run into exactly this.

Hah!  Great minds think alike.

But they missed a few files (not Makefiles).  The following shell command finds 
every openwrt file that's not UTF-8 (and isn't obviously binary).  It works 
because '.' matches only properly-encoded characters.  You may need a new GNU 
grep for this command to be reliable.

LC_ALL=en_US.utf8 grep -lv '^.*$' \
  $(git ls-files | grep -Ev '\.(patch|bin|squashfs)$')





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

Previous Next


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