GNU bug report logs - #20526
BUG: text file is detected as binary

Previous Next

Package: grep;

Reported by: Sebastian Poehn <sebastian.poehn <at> gmail.com>

Date: Thu, 7 May 2015 15:41:03 UTC

Severity: normal

Merged with 19230, 19985, 21558

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Norihiro Tanaka <noritnk <at> kcn.ne.jp>
Cc: sebastian.poehn <at> gmail.com, 20526 <at> debbugs.gnu.org
Subject: bug#20526: grep BUG: text file is detected as binary
Date: Tue, 5 Jan 2016 23:33:39 -0800
[Message part 1 (text/plain, inline)]
Norihiro Tanaka wrote:
> I see that it is good idea, but I propose minor change for your
> fix.  Perhaps, it will be what you want.

I think the problem here is that the code was not computing unibyte_mask 
correctly; that is, the comment for unibyte_mask is correct, and usage of 
unibyte_mask is correct, but unibyte_mask was sometimes initialized incorrectly 
in unusual locales. I installed the attached patch to try to fix that. Computing 
an optimal unibyte_mask (for a reasonable definition of "optimal") is likely 
more trouble than it is worth.
[0001-Fix-calculation-of-unibyte_mask.patch (text/x-diff, attachment)]

This bug report was last modified 9 years and 192 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.