GNU bug report logs - #22838
New 'Binary file' detection considered harmful

Previous Next

Package: grep;

Reported by: Marcello Perathoner <marcello <at> perathoner.de>

Date: Sun, 28 Feb 2016 18:13:01 UTC

Severity: normal

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

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Marcello Perathoner <marcello <at> perathoner.de>
To: Eric Blake <eblake <at> redhat.com>, Paul Eggert <eggert <at> cs.ucla.edu>, 22838 <at> debbugs.gnu.org
Subject: bug#22838: New 'Binary file' detection considered harmful
Date: Mon, 29 Feb 2016 18:40:40 +0100
On 02/29/2016 06:22 PM, Eric Blake wrote:
> On 02/29/2016 10:14 AM, Marcello Perathoner wrote:
>>
>> A text file with encoding problems is a text file and not a binary file.
>
> Wrong, at least according to the POSIX definition of text file.  A text
> file is one with no encoding errors.


"""
3.397 Text File

A file that contains characters organized into zero or more lines. The 
lines do not contain NUL characters and none can exceed {LINE_MAX} bytes 
in length, including the <newline> character. Although POSIX.1-2008 does 
not distinguish between text files and binary files (see the ISO C 
standard), many utilities only produce predictable or meaningful output 
when operating on text files. The standard utilities that have such 
restrictions always specify "text files" in their STDIN or INPUT FILES 
sections.

"""

-- The Open Group Base Specifications Issue 7
IEEE Std 1003.1, 2013 Edition
Copyright © 2001-2013 The IEEE and The Open Group




Regards

-- 
Marcello Perathoner





This bug report was last modified 8 years and 256 days ago.

Previous Next


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