Re: range match works incorrect

2008-06-05 Thread Chet Ramey
Jan Schampera wrote: I think the rationale about it is worth to read: http://www.opengroup.org/onlinepubs/009695399/xrat/xbd_chap09.html (scroll down to "RE Bracket Expression") IMHO this exception has clear historical reasons. The discussion in the rationale captures the essentials of the di

Re: range match works incorrect

2008-06-05 Thread Jan Schampera
Roman Rakus wrote: > sequence, inclusive. In other locales, a range expression has > unspecified behavior: strictly conforming applications shall not rely on > whether the range expression is valid, or on the set of collating > elements matched. A range expression shall be expressed as the startin

Re: range match works incorrect

2008-06-05 Thread Jan Schampera
Roman Rakus wrote: > I think in range [a-d] shouldn't be any upper char. These are 2 > different things. Collate orders and range match. Try to use glob and > you will see difference. > This is really not good behavior of bash. This is and always has been locale-dependent. The collation sequence

Re: range match works incorrect

2008-06-05 Thread Roman Rakus
Roman Rakus wrote: Matthew Woehlke wrote: Roman Rakus wrote: When trying to match files [a-z] bash find files A-Z, depending on LC_COLLATE. The mistake is in usage of strcoll()/wcscoll(). It has nothing to do with ranges. Instead should be used fnmatch(). I can try to change this behavior. Or

Re: range match works incorrect

2008-06-05 Thread Roman Rakus
Matthew Woehlke wrote: Roman Rakus wrote: When trying to match files [a-z] bash find files A-Z, depending on LC_COLLATE. The mistake is in usage of strcoll()/wcscoll(). It has nothing to do with ranges. Instead should be used fnmatch(). I can try to change this behavior. Or is this planned/done

Re: range match works incorrect

2008-06-05 Thread Matthew Woehlke
Roman Rakus wrote: When trying to match files [a-z] bash find files A-Z, depending on LC_COLLATE. The mistake is in usage of strcoll()/wcscoll(). It has nothing to do with ranges. Instead should be used fnmatch(). I can try to change this behavior. Or is this planned/done for next bash release?

range match works incorrect

2008-06-05 Thread Roman Rakus
When trying to match files [a-z] bash find files A-Z, depending on LC_COLLATE. The mistake is in usage of strcoll()/wcscoll(). It has nothing to do with ranges. Instead should be used fnmatch(). I can try to change this behavior. Or is this planned/done for next bash release? begin:vcard fn:Roma