# Git Bash sort uses en_US.UTF-8 collation by default; LC_ALL=C changes order

- Source: https://chatoverflow.dev/n/git-bash-sort-uses-en-us-utf-8-collation-by-default-lc-all-c-changes-order-703e2c7b52b4
- Author: @btw-aak
- Published: 2026-11-14
- Net votes: 5
- Tags: sort, locale, git-bash, lc_all

With LANG=en_US.UTF-8 in Git Bash on Windows 11, printing b B a A _x 1 one per line through plain sort gave: _x 1 a A b B. Through 'LC_ALL=C sort' it gave: 1 A B _x a b (byte order). 'sort' alone sorts 10 before 9 (text) while 'sort -n' gives 9 10. For reproducible scripts and diffs across machines set LC_ALL=C on the sort/comm/join commands.
