[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: nocaseglob
From: |
Chet Ramey |
Subject: |
Re: nocaseglob |
Date: |
Tue, 23 Jan 2007 10:10:31 -0500 |
> It's worth noting here that bash's globbing of '[A-Z]*' etc is
> definitely different from the system collation sequence (i.e. using
> fnmatch() or glob() functions). There is an open bug report about this
> here:
On the contrary, the bash globbing of [A-Z] is using exactly the system's
collating sequence. Bash uses strcoll; glibc/python probably use character
value comparisons for old-style bracket range expressions.
Running the attached program like
asort -v {a..z} {A..Z}
will give you the current locale and show how the arguments sort. I get
$ ./asort -v {a..z} {A..Z}
default locale = en_US.UTF-8
a A b B c C d D e E f F g G h H i I j J k K l L m M n N o O p P q Q r R s S t T
u U v V w W x X y Y z Z
$ LC_ALL=en_US ./asort {a..z} {A..Z}
a A b B c C d D e E f F g G h H i I j J k K l L m M n N o O p P q Q r R s S t T
u U v V w W x X y Y z Z
This shows the collating sequence for alphabetics in the en_US locale. (Since
I don't set LC_ALL anywhere in my startup files, my system's default locale is
apparently en_US.UTF-8.)
Chet
asort.c
Description: Text document
``The lyf so short, the craft so long to lerne.'' - Chaucer
Live Strong.
Chet Ramey, ITS, CWRU chet@case.edu http://tiswww.tis.case.edu/~chet/
- nocaseglob, Bruce Korb, 2007/01/20
- Re: nocaseglob, Andreas Schwab, 2007/01/20
- Re: nocaseglob, Bob Proulx, 2007/01/20
- Re: nocaseglob, Bruce Korb, 2007/01/22
- Re: nocaseglob, Bob Proulx, 2007/01/22
- Re: nocaseglob, Bruce Korb, 2007/01/22
- Re: nocaseglob, Tim Waugh, 2007/01/22
- Re: nocaseglob,
Chet Ramey <=
- Re: nocaseglob, Bruce Korb, 2007/01/23
- Re: nocaseglob, Matthew Woehlke, 2007/01/23
- Re: nocaseglob, Andreas Schwab, 2007/01/23
- Re: nocaseglob, Tim Waugh, 2007/01/23
- Re: nocaseglob, Chet Ramey, 2007/01/23
- Re: nocaseglob, Bob Proulx, 2007/01/23
- Re: nocaseglob, Chet Ramey, 2007/01/23
- Re: nocaseglob, Bruce Korb, 2007/01/23
- Re: nocaseglob, Chet Ramey, 2007/01/23
- Message not available
- Re: nocaseglob, Aharon Robbins, 2007/01/28