[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Dealing with character ranges in grep
From: |
Paul Eggert |
Subject: |
Re: Dealing with character ranges in grep |
Date: |
Thu, 09 Jun 2011 10:14:01 -0700 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc14 Thunderbird/3.1.10 |
On 06/08/2011 10:14 PM, Aharon Robbins wrote:
> So, for the upcoming gawk 4.0, I decided (as Karl put it) to cut the
> Gordian knot and make ranges behave like the C locale, the way it's long
> been documented, and as most people expect. Those who want the POSIX
> behavior can still get it using --posix.
This comment and the ensuing thread seems to be assuming old POSIX.
In new POSIX, that is, in POSIX 1003.1-2008, the standardization committee
removed the old, bogus requirement of using collating element order.
The new rule is that the regular expression [a-z] has an unspecified
behavior outside the C (or POSIX) locale. So the new gawk behavior
will conform to POSIX, even without the --posix option.
I suggest that gawk's behavior for [a-z] be the same regardless of whether
--posix is specified, and that this behavior be what users expect
(namely, the ASCII character range). This will be simpler.
Similarly for grep, glibc, etc.
For the POSIX 1003.1-2008 rule, see rule 7 of:
http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_03_05
and for the reasoning behind the rule change, see:
http://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xbd_chap09.html#tag_21_09_03_05
- Re: Dealing with character ranges in grep, (continued)
- Re: Dealing with character ranges in grep, Jim Meyering, 2011/06/16
- Re: Dealing with character ranges in grep, Stanislav Brabec, 2011/06/16
- Re: Dealing with character ranges in grep, Johannes Meixner, 2011/06/16
- Re: Dealing with character ranges in grep, Stanislav Brabec, 2011/06/16
- Re: Dealing with character ranges in grep, Johannes Meixner, 2011/06/16
- Re: Dealing with character ranges in grep, Aharon Robbins, 2011/06/16
- Re: Dealing with character ranges in grep, Paolo Bonzini, 2011/06/27
- Re: Dealing with character ranges in grep, Jim Meyering, 2011/06/27
Re: Dealing with character ranges in grep, Karl Berry, 2011/06/10
Re: Dealing with character ranges in grep,
Paul Eggert <=
- Re: Dealing with character ranges in grep, Paolo Bonzini, 2011/06/09
- Re: Dealing with character ranges in grep, Aharon Robbins, 2011/06/10
- Re: Dealing with character ranges in grep, Aharon Robbins, 2011/06/13
- Re: Dealing with character ranges in grep, Paolo Bonzini, 2011/06/14
- Re: Dealing with character ranges in grep, Aharon Robbins, 2011/06/14
- Re: Dealing with character ranges in grep, Aharon Robbins, 2011/06/15
- Re: Dealing with character ranges in grep, Paul Eggert, 2011/06/15
- Re: Dealing with character ranges in grep, Eric Blake, 2011/06/15
- Re: Dealing with character ranges in grep, Aharon Robbins, 2011/06/16
- Re: Dealing with character ranges in grep, Paolo Bonzini, 2011/06/27