On 02/16/2017 10:10 AM, Alexey Shipunov wrote:
I wonder how much work would require to invent new option, saying --binary-text-strict which will cause grep to stop with error and do not output anything...
Something like that shouldn't be hard, although "do not output anything" is too simple, as we can't expect grep to make two passes through the whole input, which means that it could already have output something before it discovers the encoding error.