[OpenWrt-Devel] [OpenWrt-Users] note: grep-2.21 now treats ISO-8859 text files as "binary"

camden lindsay camden.lindsay+openwrt at gmail.com
Thu Dec 11 18:36:50 EST 2014


What is the proper resolution to this?

A newer version of grep breaks the feeds script for (at least ) one package
(clearsilver) in oldpackages because it recognizes the file as being binary
and reports such... ending up breaking the pattern matching in the
following script lines.

What is the appropriate way to fix this?
- Add the -a flag to offending line  to allow binary files to be treated as
- Set environmental flag (somehow) to force locale to C (LC_ALL=C); another
suggestion from the GNU.org folks
- Contact package maintainer and request the file locale be changed to
ASCII (If i'm not wrong the only character in it not ASCII is the
'MAINTAINER:=' field)

This will break build for anyone enabling oldpackages in their


On Thu, Dec 11, 2014 at 12:49 PM, Robert P. J. Day <rpjday at crashcourse.ca>

> On Thu, 11 Dec 2014, camden lindsay wrote:
> > If i'm reading that thread correctly, this is a 'feature' rather
> > than a 'bug'.. From that discussion:
> > " This is another side effect of using a multibyte locale. As long
> > as there are no NUL bytes in your input, you can work around the
> > issue by running grep in the C locale:
> >
> >   LC_ALL=C grep ...
> > "
> > "Yes, the C locale has the nice effect of EVERY byte being a valid single
> > byte character, leaving only NUL bytes and a non-empty file not ending
> > in newline as the only reasons for a file to be marked binary.
> > "
>   i won't argue that it's a feature, only that it has the potential to
> catch the occasional person unawares. :-P
> > I wonder if this is something that the devs would consider
> > patching... i'm not sure what the proper way to declare a variable
> > would be (or if they woudl want to do it)... or if it would be
> > better to use -a in that grep line.
>   the only gotcha i've run across is a single Makefile being
> interpreted as ISO-8859, so just fixing *that* call to "grep" would be
> sufficient.
> rday
> --
> ========================================================================
> Robert P. J. Day                                 Ottawa, Ontario, CANADA
>                         http://crashcourse.ca
> Twitter:                                       http://twitter.com/rpjday
> LinkedIn:                               http://ca.linkedin.com/in/rpjday
> ========================================================================
> _______________________________________________
> openwrt-users mailing list
> openwrt-users at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20141211/364eaf34/attachment.htm>
-------------- next part --------------
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list