Date: Tue, 18 Feb 2025 17:46:46 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 284864] sort does case-independent sort even without -f or --ignore-case Message-ID: <bug-284864-227-BERoYAVvNZ@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-284864-227@https.bugs.freebsd.org/bugzilla/> References: <bug-284864-227@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D284864 --- Comment #12 from wbe@psr.com --- (In reply to Andriy Gapon from comment #11) > Inclined to close this as 'not a bug'. I agree it's not a bug. However ... > This is not about case sensitivity and, thus, -f flag really. It kind of is. > The manual page already has several references to collation order and LC_= COLLATE. Indeed it does, such as "... are performed lexicographically, according to = the current locale's collating rules" said right there in the first paragraph. = I had no idea that could mean "including upper/lower case differences not mattering if the remainder of the sort field differs (for locales other than C)". > Maybe they should be more prominent. I don't think that would help. I now understand the collating rules better, you had to rediscover them, they do indeed depend on the locale, etc. Some= one who doesn't already know all that isn't going to realize that locale rules (except for C) usually result in case-independent sorting. Unless that's sa= id explicitly, merely saying "it depends" more prominently won't make that apparent. I think the current description of -f suggests that one uses the switch to control case-independent sorting and that, absent -f, one can expect more C-like case-dependent sorting. Except for C locale and sort fields that are identical except for case (level 3), that conclusion is incorrect. Thus I think it merits some kind of comment under -f not to expect that (except fo= r C) OR an explicit comment somewhere that, except for C locale, upper/lower c= ase is less important to sort order than what follows on the line and thus may match case-independently. Just my opinion. I had no idea locale collation rules do what they do, and= the only reference to case-(in)dependent sorting was the description under -f, = and I came to the wrong conclusion. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-284864-227-BERoYAVvNZ>