From nobody Tue Feb 18 11:58:01 2025 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YxyhT5VWqz5nVLn for ; Tue, 18 Feb 2025 11:58:01 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YxyhT4kDwz3DvD for ; Tue, 18 Feb 2025 11:58:01 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1739879881; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0RVF7yD1EZcRBfR+0NXGbU87pi7hOZjKMY/9Jx9oHxM=; b=I+7g1Sve+faBO3LCoOfIhwzEb7fgwrJB+GZN5nScKPjkiv920n7lowOvOeLrqW06k/UUG3 PtXJ2zzzCHS7jCLBB/uAVpz/wz8WEVeopJkaOjQo0/2XpmiWi2/I0E35pNx5gdL/Cs+l94 jU/U0QTr1+QfvxgoCSr141Em0XcAmDWbuH65vNE1oxedY0TS4Xv/V5bAksf5oGreqSD73N 6YZMqfjQbJsrI6mu9ljJK251l/XOqwsKmHH16DeEstgFp1xZQbB4uCJ2fvFKiVZm5l2wCk s5zmZWOyRczX9Jy14AkLBtvq7PJaL9JWoTjzBeaxBxM9vCPDY+dO2+hU9hVBsg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1739879881; a=rsa-sha256; cv=none; b=HllT9PmrfOZVwDEFlNv1uhuBtf0fWvtMy/rOqqpOj3SrKzWktrVpBMAZcmkNwMaBVYtQKq KRoAR9atrGqX5mNec10u4xdFexB3WX8gme98qIYfhG6I3C8TbGi/MuqEucW49yFVBRgWCQ 70M2KET5jeYAWeGHAss8Ck8KI9zvR0I7FfcvaZgOkxAYOdm+bq0dBP3+8/hBdLvijRWPPY /jrxRUYhevUxl4BZa4SY8mmDADixy/YHHfEm/bngUCUSaHUxP8QIu8Zk3t76+qfCI5py6P 7Ag3KGldOU4CtGKScVWLMo+G0lVT9b7jccvlCc4bCgSQS44Vgb61bZ+ZHN15yw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1739879881; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0RVF7yD1EZcRBfR+0NXGbU87pi7hOZjKMY/9Jx9oHxM=; b=RxWm6tXLJ0ipaUUHtu1fzAIwAY5Up8ccweWnvac2GLB3TxGnz1jwLKIZIsWmactsKdc5y4 eSKYI59DbBlO55B4kxcJWwGbgjvJho6u3WjpZ/gelS2EtzQ2cTjHcJZP5J19YBO31QhJ1t QtG08ZwRLalknp/pq3NX1NXqWOpvqb9jCb5fsJKL7xaVcFzDkqeblw+NMsgis0SsQD7RQ7 YdgQlxGkOJRjo9XAsIywJ6unm3cK4xmeJdBVHk3d6BEjAYkXfDYvI9L6lHSN3GnsFV0u8/ llANp6UG1XjAIYIorXNTHO9zYUpJKprt5z46V5I+dBiPya2EYfwdJNHD7tFbow== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YxyhT3j0Bz2mP for ; Tue, 18 Feb 2025 11:58:01 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 51IBw1uL049608 for ; Tue, 18 Feb 2025 11:58:01 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 51IBw1En049607 for bugs@FreeBSD.org; Tue, 18 Feb 2025 11:58:01 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 284864] sort does case-independent sort even without -f or --ignore-case Date: Tue, 18 Feb 2025 11:58:01 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 14.2-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: avg@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D284864 --- Comment #4 from Andriy Gapon --- Okay, I think that this should be some sort of a FAQ now. There is no problem with sort. It's just how the collation weights are defined for 'A' and 'a' inn the respective locales. E.g., for en_US.UTF-8: ;;; ;;; The first two weights are equal which means that during initial comparison = of strings 'A' and 'a' would compare equal. If there are any unequal symbols (like '1', '2') they will decide the comparison result. Only if all symbols are equal, then the comparison would proceed to using second weights, then third weights, etc. And by the third weights, 'a' is smaller than 'A'. I am not sure why collation weights are defined that way, but sort certainly just obeys them. TLDR: use C locale for traditional sort order. --=20 You are receiving this mail because: You are the assignee for the bug.=