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

Submitted by:  Dario Niedermann <ndr>
Submitted on:  Wed 20 Oct 2010 10:44:27 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Invalid
Privacy: PublicAssigned 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>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 21 Oct 2010 07:20:02 AM UTCbonziniStatusNone=>Invalid
      Open/ClosedOpen=>Closed
    Wed 20 Oct 2010 10:44:27 PM UTCndrCarbon-Copy-=>Added ndr

    Back to the top


    Powered by Savane 3.1-cleanup1