Skip to content

dd: fix ISO-8859-1 case conversion for conv=lcase/ucase#10830

Merged
sylvestre merged 1 commit intouutils:mainfrom
sylvestre:conv-dd
Mar 10, 2026
Merged

dd: fix ISO-8859-1 case conversion for conv=lcase/ucase#10830
sylvestre merged 1 commit intouutils:mainfrom
sylvestre:conv-dd

Conversation

@sylvestre
Copy link
Contributor

No description provided.

@collinfunk
Copy link

This assumes that the user is using a ISO-8859-1 locale and not another unibyte locale, e.g., ISO-8859-9.

@ChrisDryden
Copy link
Collaborator

I think we're going to have to build the runtime conversion to use libc to get the locale data for these

  pub fn build_lcase_table() -> ConversionTable {
      let mut table = [0u8; 256];
      for i in 0..256 {
          table[i] = unsafe { libc::tolower(i as libc::c_int) } as u8;
      }
      table
  }

  pub fn build_ucase_table() -> ConversionTable {
      let mut table = [0u8; 256];
      for i in 0..256 {
          table[i] = unsafe { libc::toupper(i as libc::c_int) } as u8;
      }
      table
  }

@github-actions
Copy link

github-actions bot commented Feb 8, 2026

GNU testsuite comparison:

GNU test failed: tests/tail/retry. tests/tail/retry is passing on 'main'. Maybe you have to rebase?
Congrats! The gnu test tests/dd/conv-case is no longer failing!
Congrats! The gnu test tests/tail/tail-n0f is now passing!

@sylvestre sylvestre marked this pull request as draft February 8, 2026 21:58
@sylvestre
Copy link
Contributor Author

testing a different approach

@github-actions
Copy link

github-actions bot commented Feb 8, 2026

GNU testsuite comparison:

Congrats! The gnu test tests/dd/conv-case is no longer failing!
Congrats! The gnu test tests/tail/tail-n0f is now passing!

@github-actions
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/dd/conv-case is no longer failing!

@github-actions
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/dd/conv-case is no longer failing!

@github-actions
Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/tail/follow-name (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/dd/conv-case is no longer failing!

@sylvestre sylvestre force-pushed the conv-dd branch 2 times, most recently from 7e7f601 to 09f6769 Compare February 24, 2026 23:04
@codspeed-hq
Copy link

codspeed-hq bot commented Feb 24, 2026

Merging this PR will not alter performance

✅ 298 untouched benchmarks
⏩ 48 skipped benchmarks1


Comparing sylvestre:conv-dd (6833c8c) with main (b3f6e3b)

Open in CodSpeed

Footnotes

  1. 48 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@github-actions
Copy link

GNU testsuite comparison:

GNU test failed: tests/date/resolution. tests/date/resolution is passing on 'main'. Maybe you have to rebase?
Skip an intermittent issue tests/pr/bounded-memory (fails in this run but passes in the 'main' branch)
Congrats! The gnu test tests/dd/conv-case is no longer failing!

@sylvestre sylvestre marked this pull request as ready for review February 25, 2026 08:17
@github-actions
Copy link

GNU testsuite comparison:

GNU test failed: tests/timeout/timeout-group. tests/timeout/timeout-group is passing on 'main'. Maybe you have to rebase?
Skip an intermittent issue tests/tail/symlink (fails in this run but passes in the 'main' branch)
Congrats! The gnu test tests/cut/bounded-memory is no longer failing!
Congrats! The gnu test tests/dd/conv-case is no longer failing!
Note: The gnu test tests/tail/pipe-f is now being skipped but was previously passing.

@github-actions
Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/date/date-locale-hour (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/date/resolution (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/tty/tty-eof (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/dd/conv-case is no longer failing!
Note: The gnu test tests/printf/printf-surprise is now being skipped but was previously passing.
Note: The gnu test tests/tail/pipe-f is now being skipped but was previously passing.
Congrats! The gnu test tests/tail/tail-n0f is now passing!
Skip an intermittent issue tests/pr/bounded-memory (was skipped on 'main', now failing)

@sylvestre sylvestre merged commit 36b5e59 into uutils:main Mar 10, 2026
159 checks passed
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.

3 participants