bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: have you ever mistyped [[:lower:]] as [:lower:] ?


From: Jim Meyering
Subject: Re: have you ever mistyped [[:lower:]] as [:lower:] ?
Date: Wed, 01 Sep 2010 19:06:16 +0200

Paul Eggert wrote:
> On 09/01/2010 07:25 AM, Eric Blake wrote:
>
>> Personally, I'd _like_ to try to get POSIX to allow unspecified behavior
>> for a bracket expression that starts and ends with colon,
>
> Likewise.  Thanks for starting the Aardvark at
> <http://austingroupbugs.net/view.php?id=305>.
>
> I was amused to see that, under its argument,
> grep is already within its rights to reject [:space:]
> even when conforming to POSIX.  I'm not sure I
> agree with that position, but I do agree
> with the proposal.
>
>>>> Ranges like [A-Z] are so common that changing the default
>>>> would have far-reaching effects.
>
> No, actually it would be a Good Thing to fix [A-Z] to have
> its ASCII meaning even in non-ASCII locales.  GNU Emacs
> already does that, to good effect, and would be a
> good precedent for grep doing the same thing.

That does sound like a fine idea.
My point was that we cannot afford to warn/error
indicate that [A-Z] is not portable.

> Such a behavior conforms to POSIX, which explicitly
> says that [A-Z] has unspecified behavior outside
> the POSIX locale.  (See POSIX 9.3.5 point 7 at
> <http://www.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_03_05>.)
> Users invariably want the Emacs behavior, not the
> grep behavior.

An easy sell.  Good!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]