Repository navigation
fix(env): improve non-UTF-8 ACP fallback, GNU error wording, and env.md status (Fixes #1840) - #1843
Merged
Merged
Conversation
…md status (Fixes #1840) Captain graft: re-assembled onto current main (7c225a9) after prerequisite #1841 (canonical empty environment block) landed. Three-way merge of env.cpp / env_unit_test.cpp / env.md was conflict-free; diff vs main is byte-identical in stats to the original PR diff vs its base (+130/-35, +13/-20, +1/-1). UNVERIFIED-BY-CAPTAIN pending fresh CI.
caomengxuan666
force-pushed
the
fix/1840-env-polish
branch
from
November 22, 2026 17:50
75dd52c to
8648345
Compare
…aft bookkeeping for #1843) The env polish in this PR adds three source strings whose zh-CN catalog sync lands in a later translation batch: command.env.error.chdir_failed, command.env.error.exec_failed, command.env.error.shebang_hint. Per the drift gate's own rule, record the growth in scripts/i18n-drift-baseline.json in the same PR via scripts/check_i18n_drift.py --update-baseline: 192 items total, zh-CN missing +3, no other drift change. UNVERIFIED-BY-CAPTAIN pending fresh CI
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.
Fixes #1840.
Summary
utf8_sequence_length,acp_bytes_to_wstring, andenv_bytes_to_wstringinsrc/commands/env.cppso valid UTF-8 runs pass through untouched while non-UTF-8 byte runs (e.g.,X=\377in.envfiles) are decoded viaCP_ACPinstead of collapsing directly toU+FFFD. (Arbitrary non-UTF-8 bytes still cannot round-trip through Windows' UTF-16 environment block; the byte-faithfulenvprint path is unchanged.)run_commandandreport_exec_errorinsrc/commands/env.cppso-Cfailures reportenv: cannot change directory to '<dir>': <reason>and missing/unexec commands reportenv: '<cmd>': <reason>. Added--argv0without command usage error (rc 125).tests/unit/env/env_unit_test.cppto assert the GNU message forms.DOCS/gnu-coreutils/env.mdimplementation status to reflect that-S/--split-string,-v/--debug, and-a/--argv0(external programs) are implemented, with env: -a/--argv0 cannot dispatch any suite command (multicall argv0 conflict) #1839 tracking multicall-adispatch.Verification
test-envwith MSVC (cmake --preset test) and ranenv.*: 48/48 passed.