[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: grep 2.5.1: NUL byte doesn't match a complemented character class
From: |
Jim Meyering |
Subject: |
Re: grep 2.5.1: NUL byte doesn't match a complemented character class |
Date: |
Thu, 23 Aug 2007 15:25:53 +0200 |
Joe Wells <address@hidden> wrote:
> Jim Meyering <address@hidden> writes:
>> On some systems, the locale name is spelled slightly differently:
>> [get the proper spelling from the output of "locale -a"]
>
> (By the way, this is irrelevant to the bug in grep, but I believe the
> output of “locale -a” does not give the officially correct locale
> names. On my system, it says my locale name is “en_US.utf8”. My
> understanding from reading the standards documents is that the
> officially correct name is “en_US.UTF-8”. The use of “utf8” occurs
> because glibc has an internal compatibility hack where it downcases
> the charset name and removes hyphens from it before looking up the
> locale on disk and in data structures.)
Maybe you'd prefer s/the proper/a useful/?
I just want to be sure that the locale setting I use will be
recognized by the system at hand, and don't care if it's officially correct.
In pedantic mode, this might be more to your liking:
if you want to be sure to use a spelling that is recognized on your
system, one way is to choose from the list output by "locale -a".
>> RHEL5 has the bug [rpm -q grep -> grep-2.5.1-52.2]:
>>
>> $ printf '\0x' | LC_CTYPE=en_US.UTF-8 grep '[^x]x'
>> [Exit 1]
>>
>> Debian unstable seems not to have a problem:
>>
>> $ printf '\0x' | LC_CTYPE=en_US.utf8 grep '[^x]x'
>> Binary file (standard input) matches
>
> I'm glad you were able to reproduce the bug. Can you tell if it is in
> grep or the locales or glibc?
I haven't investigated.
>> I've Cc'd address@hidden, since that's the preferred bug-reporting
>> address.
>
> Then I have another bug to report. The man page for “grep” on my
> system (Ubuntu Dapper Drake) gives address@hidden as the only
That was updated upstream in Nov of 2004.
Of course, it was after the release of grep-2.5.1,
and we're still waiting for 2.5.2.
> bug reporting address. (And there is no “grep.info” file installed.
> Is there such a file?) Is this a Debian/Ubuntu bug or a problem in
> the original grep source?
There is most definitely a grep.info file.
If you wonder, check out the upstream site for grep:
http://savannah.gnu.org/projects/grep
grep.info is generated from grep.texi, here:
http://cvs.savannah.gnu.org/viewvc/grep/doc/grep.texi?root=grep&view=log
Maybe you haven't installed the documentation.
In any case, it's a Debian/Ubuntu-specific problem.
...
>>> By the way, I am using Ubuntu 6.06 LTS (“Dapper Drake”) with all
>>
>> I would consider upgrading.
>
> Of course. (But “LTS” is for “long term support”. One of its main
> advantages is not needing to upgrade.)
You shouldn't expect all of the latest fixes for small things
like this in an older *stable* release.
> Is your point that you think the RBL in question is unreliable and
> shouldn't be used? (I know RBLs in general are often controversial,
> for exactly the reason we are seeing here.)
Of course.