diff options
| author | 陆奕丞 <[email protected]> | 2026-01-31 22:55:34 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-01-31 08:55:34 -0600 |
| commit | f73f88fb56381f0ea6746964bbd4a6496f7ec229 (patch) | |
| tree | b06b0b211c985c5fc88734e7a96c07582618a461 | |
| parent | ac254fb44271e9589c766eac6c3a78e24e2da3f8 (diff) | |
| download | opencode-f73f88fb56381f0ea6746964bbd4a6496f7ec229.tar.gz opencode-f73f88fb56381f0ea6746964bbd4a6496f7ec229.zip | |
fix(pty): Add UTF-8 encoding defaults for Windows PTY (#11459)
| -rw-r--r-- | packages/opencode/src/pty/index.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/packages/opencode/src/pty/index.ts b/packages/opencode/src/pty/index.ts index 73474ed4f..d01b2b02e 100644 --- a/packages/opencode/src/pty/index.ts +++ b/packages/opencode/src/pty/index.ts @@ -108,6 +108,12 @@ export namespace Pty { TERM: "xterm-256color", OPENCODE_TERMINAL: "1", } as Record<string, string> + + if (process.platform === "win32") { + env.LC_ALL = "C.UTF-8" + env.LC_CTYPE = "C.UTF-8" + env.LANG = "C.UTF-8" + } log.info("creating session", { id, cmd: command, args, cwd }) const spawn = await pty() |
