buggrep - Bugs: bug #31389, False positive due to apparent...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #31389: False positive due to apparent case insensivity

Submitter:  Dario Niedermann <ndr>
Submitted:  Wed 20 Oct 2010 10:44:27 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Invalid
Privacy:  Public Assigned to:  None
Open/Closed:  Closed

Thu 21 Oct 2010 10:02:10 AM UTC, comment #4: 

Good to know, thank you.

Dario Niedermann <ndr>
Thu 21 Oct 2010 09:49:42 AM UTC, comment #3: 

It does, but you can simply export LC_COLLATE and LC_CTYPE with a value of "POSIX" in your .bashrc (as well as at the top of shell scripts where you care about this behavior) to override it.

Also, traditional [a-z] and [A-Z] can be represented portably as [[:lower:]] and [[:upper:]] (and there's also [[:alpha:]] and [[:alnum:]] which come in handy).

Paolo Bonzini <bonzini>
Thu 21 Oct 2010 09:47:32 AM UTC, comment #2: 

This sucks.

Dario Niedermann <ndr>
Thu 21 Oct 2010 07:20:02 AM UTC, comment #1: 

Behavior of [a-z] outside the POSIX locale is undefined.  Even in 2.7 it may still occur in other locales than en_US, for example cs_CZ.

Paolo Bonzini <bonzini>
Wed 20 Oct 2010 10:44:27 PM UTC, original submission:  

The 1st match should not happen...

~> echo 'NO SMALL CAPS' | grep '[a-z]'
NO SMALL CAPS
~> echo '1234567890' | grep '[a-z]'
Exit 1
~> grep --version
GNU grep 2.5.3

Copyright (C) 1988, 1992-2002, 2004, 2005  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

~> locale
LANG=en_US.utf8
LC_CTYPE="en_US.utf8"
LC_NUMERIC="en_US.utf8"
LC_TIME="en_US.utf8"
LC_COLLATE="en_US.utf8"
LC_MONETARY="en_US.utf8"
LC_MESSAGES="en_US.utf8"
LC_PAPER="en_US.utf8"
LC_NAME="en_US.utf8"
LC_ADDRESS="en_US.utf8"
LC_TELEPHONE="en_US.utf8"
LC_MEASUREMENT="en_US.utf8"
LC_IDENTIFICATION="en_US.utf8"
LC_ALL=en_US.utf8
~>

Dario Niedermann <ndr>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bonzini (Posted a comment)
  • -email is unavailable- added by ndr (Submitted the item)
  • -email is unavailable- added by ndr
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-10-21 bonzini StatusNone Invalid
        Open/ClosedOpen Closed
    2010-10-20 ndr Carbon-Copy- Added ndr

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code