You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(pwsh): emit ASCII-safe init output for non-ASCII paths
PowerShell decodes native command stdout using [Console]::OutputEncoding,
which defaults to the legacy OEM code page on Windows. When a path in the
init bootstrap contains non-ASCII characters (e.g. a ² in the username),
the UTF-8 bytes are mangled before the init script can run, breaking
initialization with 'term is not recognized' errors.
Quote pwsh strings containing non-ASCII runes as expandable string
expressions built from [char] casts so everything written to stdout, and
to the on-disk init script, is pure ASCII, which survives every code
page. Elvish keeps the previous plain single-quote behavior via its own
quoting function.
Validated against pwsh 7.4.6 in every injection context: env var
assignment, the call operator, Invoke-Expression, argument-mode
--config= tokens, and the omp.ps1 executable assignment.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BCNz9G4sSmwRixkjVodcWo
0 commit comments