Skip to content

Commit 67edef5

Browse files
01luyichengathal7
authored andcommitted
fix(pty): Add UTF-8 encoding defaults for Windows PTY (anomalyco#11459)
1 parent d1c9ab6 commit 67edef5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/opencode/src/pty/index.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,12 @@ export namespace Pty {
108108
TERM: "xterm-256color",
109109
OPENCODE_TERMINAL: "1",
110110
} as Record<string, string>
111+
112+
if (process.platform === "win32") {
113+
env.LC_ALL = "C.UTF-8"
114+
env.LC_CTYPE = "C.UTF-8"
115+
env.LANG = "C.UTF-8"
116+
}
111117
log.info("creating session", { id, cmd: command, args, cwd })
112118

113119
const spawn = await pty()

0 commit comments

Comments
 (0)