group.of.nepali.translators team mailing list archive
-
group.of.nepali.translators team
-
Mailing list archive
-
Message #04611
[Bug 1547466] Re: grep switches into binary mode while processing a text file
This bug was fixed in the package grep - 2.25-1~16.04.1
---------------
grep (2.25-1~16.04.1) xenial-proposed; urgency=medium
* New upstream release.
- Don't switch into binary mode when encountering non-ASCII characters
and running in the C locale. (LP: #1547466)
-- Martin Pitt <martin.pitt@xxxxxxxxxx> Thu, 28 Apr 2016 08:01:38
+0200
** Changed in: grep (Ubuntu Xenial)
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of नेपाली
भाषा समायोजकहरुको समूह, which is subscribed to Xenial.
Matching subscriptions: Ubuntu 16.04 Bugs
https://bugs.launchpad.net/bugs/1547466
Title:
grep switches into binary mode while processing a text file
Status in grep package in Ubuntu:
Fix Released
Status in grep source package in Xenial:
Fix Released
Status in grep source package in Yakkety:
Fix Released
Status in grep package in Debian:
Fix Released
Bug description:
I noticed this staring to happen in Xenial about two days ago. When
running sbuild (or now the buildd, too), the build breaks when trying
to compile a generated file. I traced the problem down to grep
suddenly acting weird. When not having any language set (or a non-UTF8
mode) it will start printing some lines of a source file and then
suddenly end that by printing "Binary file ... matches".
With the attached file, the difference can be observed (running
Xenial):
LANG=C grep -v xxx grant_table.h
and
LANG=C.UTF-8 grep -v xxx grant_table.h
SRU INFORMATION
===============
Upstream fixes:
- http://git.savannah.gnu.org/cgit/grep.git/commit/?id=d8a366218 (but depends on previous patches and is not sufficient by itself)
- http://git.savannah.gnu.org/cgit/grep.git/commit/?id=d8a366218 (tests+doc)
Test case:
Call grep on a file or a string with non-ASCII characters in the C locale:
$ echo 'héll☺ ≥x' | LC_ALL=C grep .
In xenial this just shows "Binary file (standard input) matches", with the fix it should show the actual input string (with some garbled output of course as the UTF-8 chars cannot be displayed in C)
Regression potential: grep is being used in tons of places; during
xenial we had to fix/put a "use grep -a" workaround into a lot of
packages to fix the fallout from grep 2.23 which introduced this. That
said, as a result of "Binary file matches" does not give any more
information than the actual string match, and scripts which get along
with this answer most likely just check the exit code anyway (which
does not change), the risk is bearable.
We will soon do a test rebuild in yakkety with gcc-6 and grep 2.25,
and will sift through the results to identify new FTBFS that are due
to grep 2.25. This SRU should not be released until this happens.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/grep/+bug/1547466/+subscriptions