Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #14874 > unrolled thread

Re: Bash removes unrequested characters in bracket expressions (not a range).

Started byChet Ramey <chet.ramey@case.edu>
First post2018-11-27 11:52 -0800
Last post2018-11-27 11:52 -0800
Articles 1 — 1 participant

Back to article view | Back to gnu.bash.bug

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Bash removes unrequested characters in bracket expressions (not a range). Chet Ramey <chet.ramey@case.edu> - 2018-11-27 11:52 -0800

#14874 — Re: Bash removes unrequested characters in bracket expressions (not a range).

FromChet Ramey <chet.ramey@case.edu>
Date2018-11-27 11:52 -0800
SubjectRe: Bash removes unrequested characters in bracket expressions (not a range).
Message-ID<mailman.5070.1543846742.1284.bug-bash@gnu.org>
On 11/24/18 2:32 PM, Chet Ramey wrote:

>> But IMO locale collation should not be used for an explicit list.
> 
> Collation order is used for each individual character in a bracket
> expression when compared against the string, as posix specifies.
> 
>> I have been made aware that there is a
>>       cstart = cend = FOLD (cstart);
>> inside the `sm_loop.c` file that will convert into a range many
>> individual character. If that understanding is correct that is the
>> source of the difference with other shells.
> 
> I'm not sure what you mean by "convert into a range." If cstart and cend
> were treated as a range, the start end and end characters would be the
> same. If cstart == cend, a character that collates >= cstart and <= cend
> would have to collate equal to cstart and cend.

If I were you, I would file a bug report with Debian against wcscoll.

It returns 0 (equal) for L"٠" and L"0" without setting errno. That's
clearly a problem with wcscoll (if the character isn't valid in the current
locale) or the locale definition.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
		 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/

[toc] | [standalone]


Back to top | Article view | gnu.bash.bug


csiph-web