Skip to content

numfmt: --format width accounting diverges from GNU for multi-byte --suffix #11937 fix#11992

Merged
cakebaker merged 2 commits intouutils:mainfrom
Devel08:#11937-fix
Apr 25, 2026
Merged

numfmt: --format width accounting diverges from GNU for multi-byte --suffix #11937 fix#11992
cakebaker merged 2 commits intouutils:mainfrom
Devel08:#11937-fix

Conversation

@Devel08
Copy link
Copy Markdown
Contributor

@Devel08 Devel08 commented Apr 25, 2026

This PR closes #11937.
Previously, uutils numfmt treated non-ascii characters as a few characters (equal to the bytes' count), there character counts were considered when using width in the precision flag.
for example 🔗 was treated as f0 9f 94 97 (4 characters). It will now treat it as a single character, just as GNU numfmt does.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 25, 2026

GNU testsuite comparison:

Skip an intermittent issue tests/cut/bounded-memory (fails in this run but passes in the 'main' branch)
Skip an intermittent issue tests/date/date-locale-hour (fails in this run but passes in the 'main' branch)
Skip an intermittent issue tests/pr/bounded-memory (fails in this run but passes in the 'main' branch)
Note: The gnu test tests/misc/write-errors was skipped on 'main' but is now failing.

@cakebaker cakebaker merged commit c5bdff1 into uutils:main Apr 25, 2026
169 checks passed
@cakebaker
Copy link
Copy Markdown
Contributor

Thanks!

@Devel08 Devel08 deleted the #11937-fix branch April 25, 2026 16:56
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.

numfmt: --format width accounting diverges from GNU for multi-byte --suffix

2 participants