Subject: bug#22838: New 'Binary file' detection considered harmful

From: Marcello Perathoner <[email-masked]>
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