Skip to content

fix: default LANG to UTF-8 for terminal character display - #423

Merged
AmethystLiang merged 4 commits into
mainfrom
fix-terminal-character-display
Apr 9, 2026
Merged

AmethystLiang merged 4 commits into
mainfrom
fix-terminal-character-display

Conversation

@AmethystLiang

Copy link
Copy Markdown
Contributor

Summary

  • Default LANG to en_US.UTF-8 in PTY spawn environment so multi-byte characters (e.g. em dashes) render correctly when Electron is launched from Finder without inheriting shell locale
  • Inherited LANG from process.env or caller-provided args.env still takes precedence
  • Added tests covering all three LANG precedence cases
  • Added terminal e2e helper script and Electron skill docs for xterm.js PTY automation

Test plan

  • Unit tests for LANG default, inheritance, and caller override
  • Unit tests for TERM/COLORTERM/TERM_PROGRAM always set
  • pnpm typecheck passes
  • Manual: launch Orca from Finder, open terminal, type echo — and verify em dash renders correctly

The object spread approach ({LANG: default, ...process.env}) produced
undefined on CI (Ubuntu/Node 22) despite working locally. Switch to
explicit ??= assignment after the spread for reliable cross-platform
behavior.
@AmethystLiang
AmethystLiang merged commit c908bdf into main Apr 9, 2026
1 check passed
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
* fix: address review findings

* fix: improve error handling in terminal e2e helper JSON parsing

* fix: remove unused catch parameter in terminal e2e helper

* fix: use nullish coalescing assignment for LANG default in PTY spawn

The object spread approach ({LANG: default, ...process.env}) produced
undefined on CI (Ubuntu/Node 22) despite working locally. Switch to
explicit ??= assignment after the spread for reliable cross-platform
behavior.
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.

1 participant