While it is good to have the builders fixed, there is one worrying
aspect to this: this may happen to anything using grep and modifies the
output in an unexpected way while still returning a zero return code.
For example:

echo -e "Hello\nWörld" | LANG=C grep -v xxx; echo $?

will no longer return both input lines (note the German umlaut ö) but
stop at the second line (even if there were more), print a "binary ...
matches" and return with 0. So having the grep passing its output to
another pipe, there is no way to tell it is going wrong. Given that it
is not uncommon to set a LANG=C in scripts (as one then knows what
output language text messages will have) and potentially might be used
to parse file lists (where file names may have special characters) it is
hard to predict how much breakage this may cause.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1547466

Title:
  grep switches into binary mode while processing a text file

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/grep/+bug/1547466/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to