On 9/7/25 9:21 AM, Lawrence Velázquez wrote:
On Sun, Sep 7, 2025, at 8:59 AM, Greg Wooledge wrote:The ordering of characters within your locale is controlled by the authors of your localeTo contrast, I'm on macOS: $ echo $BASH_VERSION 5.3.0(11)-maint $ locale LANG="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_CTYPE="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_ALL= $ ls -1 0.txt 1.txt 2.txt 3.txt 4.txt ².txt ³.txt ¹.txt ⁰.txt ⁴.txt ₀.txt ₁.txt ₂.txt ₃.txt ₄.txt $ shopt -u globasciiranges $ ls -1 [0-5]* 0.txt 1.txt 2.txt 3.txt 4.txt
I'm also on macOS.
Mac.lan(2)$ locale
LANG="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_ALL=
Mac.lan(2)$ ls -1
².txt
³.txt
¹.txt
⁰.txt
⁴.txt
₀.txt
₁.txt
₂.txt
₃.txt
₄.txt
0.txt
1.txt
2.txt
3.txt
4.txt
Mac.lan(2)$ ls -1 [0-5]*
0.txt
1.txt
2.txt
3.txt
4.txt
Mac.lan(2)$ shopt -s globasciiranges
Mac.lan(2)$ ls -1 [0-5]*
0.txt
1.txt
2.txt
3.txt
4.txt
Mac.lan(2)$ echo $BASH_VERSION
5.3.0(14)-maint
I assume this has to do with how APFS or HFS+ stores filenames (NFC vs.
NFD Unicode).
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU [email protected] http://tiswww.cwru.edu/~chet/
OpenPGP_signature.asc
Description: OpenPGP digital signature
