Get the latest tech news
The macOS LC_COLLATE hunt: Or why does sort order differently on macOS and Linux (2020)
, why does sort(1) order differently on macOS and Linux? Zhiming Wang 2020-06-03 Today I noticed something interesting while working with a sorted list of package names: sort(1) orders them differently on macOS and Linux (Ubuntu 20.04). A very simple example, with locale set explicitly: (macOS) $ LC_ALL=en_US.UTF-8 sort <<<$'python-dev\npython3-dev' python-dev python3-dev (Linux) $ LC_ALL=en_US.UTF-8 sort <<<$'python-dev\npython3-dev' python3-dev python-dev What the hell? Same locale, different order (or technically, collation).
None
Or read this on Hacker News