sort -M Locale Month Parsing Gap
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 24.1k
- Forks
- 2k
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 365
Description
Component
sort
Description
uutils' sort -M only hardcodes recognition of English 3-letter months (JAN..DEC) and does not parse month abbreviations according to the LC_TIME/LC_ALL locale; GNU sort parses them using the locale's month table.
Test / Reproduction Steps
(A locale with non-English month abbreviations is required, such as de_DE.UTF-8.):
$ printf 'Mär\nJan\n' | LC_ALL=de_DE.UTF-8 sort -M
$ printf 'Mär\nJan\n' | LC_ALL=de_DE.UTF-8 ./target/release/coreutils sort -M
- GNU: JAN comes first
- uutils: JAN comes last
Impact
In non-LC_ALL=C/non-English environments, the -M sorting result is incorrect, and scripts relying on localized month text will fail.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the sort -M entry point and reproduce the German-locale commands in the issue, comparing uutils with GNU sort. Trace how month abbreviations are recognized and how LC_TIME or LC_ALL is read. Done means non-English locale month abbreviations sort in the same order as GNU sort, while existing English behavior remains correct.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli, localization
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100