Repository navigation
fix(od): mask high-order bit in named character output (-a / -t a) - #1897
Merged
caomengxuan666 merged 1 commit intoNov 27, 2026
Merged
Conversation
Member
|
CAPTAIN 注记:CMake run 45946272131 重跑(attempt 3)已全绿——此前 engines-fs 分片在装 WSL 步被取消属 infra 件,与 od 无关;聚合 UNCOVERED cp/ls/mv 红随之清除。本 PR 证据面齐(rust-tests + i18n 绿、新测 ok、text-lines 分片绿),余 X299 运行时复验后终裁。 |
Member
|
CAPTAIN-VERIFY(X299 运行时复验):达合入门,队长合入。lib 1092/0、新钉实跑绿;全字节(0x00–0xFF) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
b & 0x7finod::named_char, matching POSIX and GNU coreutils 9.4src/od.c:511(int masked_c = *p++ & 0x7f;).>= 0x80underod -a/od -t abypassed the 7-bit mask and emitted 2-byte UTF-8 Latin-1 characters instead of ASCII 3-column names (nul,sp,A,del), breaking both GNU byte parity and column alignment.tr!) are modified.What was removed
(b as char).to_string()innamed_char.Verification
rustfmt --check --edition 2021 rust2/crates/winux-cmds/src/od.rs: passedcargo check --workspace --tests --target x86_64-pc-windows-msvc&aarch64-pc-windows-msvc: passedcargo testexecution (named_char_ignores_high_order_bit): owed to PR CI