Date: Tue, 23 Jun 2020 07:30:21 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 247494] sort(1) order affected by LC_CTYPE Message-ID: <bug-247494-227@https.bugs.freebsd.org/bugzilla/>
index | next in thread | raw e-mail
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=247494 Bug ID: 247494 Summary: sort(1) order affected by LC_CTYPE Product: Base System Version: 12.1-STABLE Hardware: Any OS: Any Status: New Severity: Affects Many People Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: knu@FreeBSD.org My understanding is it is LC_COLLATE that affects how sort(1) compares characters and the C locale has the collation for binary comparison, so I set LC_COLLATE=C when calling sort(1) for language independent sorting, but it seems LC_CTYPE also affects how sort(1) works. % (echo 耳 ; echo 脳 ; echo 耳) | LC_CTYPE=ja_JP.UTF-8 LC_COLLATE=C LANG=C sort 耳 脳 耳 % (echo 耳 ; echo 脳 ; echo 耳) | LC_CTYPE=C LC_COLLATE=C LANG=C sort 耳 耳 脳 For reference, GNU sort works fine with any LC_CTYPE, and according to a NetBSD user the same goes for NetBSD sort. % (echo 耳 ; echo 脳 ; echo 耳) | LC_CTYPE=ja_JP.UTF-8 LC_COLLATE=C LANG=C gsort 耳 耳 脳 Is this a bug or by design? -- You are receiving this mail because: You are the assignee for the bug.help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-247494-227>
