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: Eric Blake
Subject: Re: have you ever mistyped [[:lower:]] as [:lower:] ?
Date: Wed, 01 Sep 2010 11:10:56 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.8) Gecko/20100806 Fedora/3.1.2-1.fc13 Mnenhy/0.8.3 Thunderbird/3.1.2

On 09/01/2010 11:06 AM, Jim Meyering wrote:
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!

In fact, it might even be nice to preserve the locale-dependent existing behavior of collating-element ranges for '[[.A.]-[.Z.]]', even while changing the simpler [A-Z] to do the encoding-based range, so that a rare user that really DID mean to get locale-dependent collation range can still do so.

--
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org



reply via email to

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