GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — diff: fold only ASCII letters for --ignore-file-name-case in the POSIX locale by binhvq · Pull Request #381 · uutils/diffutils

Conversation

@binhvq

@binhvq binhvq commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

Fixes #356.

fold_file_name_case always used Unicode lowercasing, so É and é were the same name with --ignore-file-name-case even in the C locale, where GNU only folds ASCII letters.

It now checks LC_CTYPE with the existing is_posix_locale (LC_ALL > LC_CTYPE > LANG, C when unset) and folds ASCII only in the POSIX locale. Exit status matches GNU diff 3.12 for the locale combinations in the test.

Unix only: on Windows these variables are normally unset, and I didn't want to change the folding there.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
binhvq added 4 commits November 11, 2026 16:02
@binhvq
diff: fold only ASCII letters for --ignore-file-name-case in the POSI…
5b08397
…X locale

File names were always lowercased as Unicode text, so names such as É and é matched in the C locale, where GNU diff keeps them apart. Follow LC_CTYPE and fold only the ASCII letters in the POSIX locale.
@binhvq
test: skip locale case folding test on case-insensitive file systems
8adb4c3
@binhvq
Merge remote-tracking branch 'origin/main' into ignore-case-ascii-in-…
fffb96a
…c-locale
@binhvq
tests: port the POSIX locale case test to uutests
2cf1c17
@codspeed

codspeed Bot commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will degrade performance by 4.61%

2 warnings

⚠️ 24 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

⚠️ 1 benchmark with a significant change ran on different hardware

Its base and head results were measured on machines with a different CPU, core count or memory, so the change might not come from the code. Run base and head on the same runner type.

Learn more about Macro Runners

See affected benchmarks

❌ 1 regressed benchmark
✅ 25 untouched benchmarks

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
❌ cmp_parser 10.3 µs 10.8 µs -4.61%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing binhvq:ignore-case-ascii-in-c-locale (2cf1c17) with main (5a55160)1

Open in CodSpeed

Footnotes

  1. No successful run was found on main (854d777) during the generation of this report, so 5a55160 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@binhvq

binhvq commented Nov 11, 2026

Copy link
Copy Markdown
Contributor Author

The CodSpeed result looks like noise: the only change is in fold_file_name_case, which the cmp parser never calls, and the report flags cmp_parser as run on different hardware.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

diff - --ignore-file-name-case folds non-ASCII letters in the C locale

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@binhvq
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.