Skip to content

join: fold -i keys to upper case like sort -f - #15841

Open
MannXo wants to merge 1 commit into
uutils:mainfrom
MannXo:fix/15759-join-ignore-case-fold-upper
Open

MannXo wants to merge 1 commit into
uutils:mainfrom
MannXo:fix/15759-join-ignore-case-fold-upper

Conversation

@MannXo

@MannXo MannXo commented Oct 25, 2026

Copy link
Copy Markdown

join -i compared the first differing bytes after folding to lower case, while sort -f (ours and GNU's) and GNU join -i fold to upper case. The two orders disagree on [ \ ] ^ _ ` , which sit between Z and a, so input prepared with sort -f looked unsorted to join -i and keys present in both files were skipped as unpairable.

CaseInsensitiveSlice::cmp now folds to upper case. Equality is unchanged.

$ printf 'svc_backup mallory\nsvcabc mallory\n' | sort -f -k 1,1 > requested
$ echo SVC_BACKUP > reserved
$ join -i -v 1 requested reserved
svcabc mallory
$ join -i requested reserved
svc_backup mallory

Before, both commands reported "is not sorted" and exited 1, the first also printed svc_backup mallory, and the second printed no joined line.

case_insensitive_matches_sort_f_order fails on main.

Closes #15759

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

join: -i folds to lowercase, unlike sort -f; underscore keys go unpaired

1 participant