Commit 53e2999
ls: use locale-aware collation for name sort
GNU ls uses strcoll() so in UTF-8 locales punctuation is reordered
(e.g. '.' sorts before '#'), placing '.' and '..' first in `ls -a`
output. uutils was always doing a byte-wise compare, diverging from
GNU in non-C locales.
Wire up uucore's ICU collator for Sort::Name, gated on
should_use_locale_collation() so C/POSIX locales keep the existing
zero-overhead byte compare path.
Fixes #118311 parent 47d7c76 commit 53e2999
3 files changed
Lines changed: 35 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| 122 | + | |
| 123 | + | |
122 | 124 | | |
123 | 125 | | |
124 | 126 | | |
| |||
1489 | 1491 | | |
1490 | 1492 | | |
1491 | 1493 | | |
1492 | | - | |
| 1494 | + | |
| 1495 | + | |
| 1496 | + | |
| 1497 | + | |
| 1498 | + | |
| 1499 | + | |
| 1500 | + | |
| 1501 | + | |
| 1502 | + | |
| 1503 | + | |
| 1504 | + | |
| 1505 | + | |
1493 | 1506 | | |
1494 | 1507 | | |
1495 | 1508 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2101 | 2101 | | |
2102 | 2102 | | |
2103 | 2103 | | |
| 2104 | + | |
| 2105 | + | |
| 2106 | + | |
| 2107 | + | |
| 2108 | + | |
| 2109 | + | |
| 2110 | + | |
| 2111 | + | |
| 2112 | + | |
| 2113 | + | |
| 2114 | + | |
| 2115 | + | |
| 2116 | + | |
| 2117 | + | |
| 2118 | + | |
| 2119 | + | |
| 2120 | + | |
| 2121 | + | |
| 2122 | + | |
| 2123 | + | |
2104 | 2124 | | |
2105 | 2125 | | |
2106 | 2126 | | |
| |||
0 commit comments