I reproduced the problem. My default locale is en_US.UTF-8.
When I use:
LC_ALL=en_US.iso-8859-8 egrep -n '[A-Z]'
the lowercase letters are not matched.
It is still mysterious to me why egrep (or grep) folds lowercase into uppercase when the locale is UTF-8.
David Harel wrote:
In the commands below I insert data to grep via standard input and terminate with <Ctrl-D>. Lines that match the expression are echoed back. To improve visibility I used -n option so we can see the line number of the matched line. BUT.
Can anyone explain the following behavior?
Did anyone fiddle with the weight of letters?
Right ========================================================== [EMAIL PROTECTED] tmp]$ grep -n '[ABCDEFGHIJKLMNOPQRSTUVWXYZ]' 123 abc ABC 3:ABC
Wrong ==================================== [EMAIL PROTECTED] tmp]$ grep -n '[A-Z]' 123 ABC 2:ABC abc 3:abc
--- Omer My own blog is at http://www.livejournal.com/users/tddpirate/
My opinions, as expressed in this E-mail message, are mine alone. They do not represent the official policy of any organization with which I may be affiliated in any way. WARNING TO SPAMMERS: at http://www.zak.co.il/spamwarning.html
================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]