Skip to content

Zoo Code forces en_US.UTF-8 locale on every command it runs, causing errors on systems that don't have that locale installed #1084

Description

@scottdk

Problem (one or two sentences)

Every time Zoo Code runs a command, it injects LANG=en_US.UTF-8 and LC_ALL=en_US.UTF-8 into the shell environment. On computers where that specific locale isn't installed, every command produces a setlocale warning, and locale-sensitive tools behave as if the system is US English even when it isn't.

Context (who is affected and when)

Anyone using Zoo Code on a machine whose locale is not en_US.UTF-8 — for example Australian users (en_AU), British users (en_GB), or anyone in a non-US locale that only has their own locale generated. They see the warning on every single command Zoo Code executes, regardless of what the command is. The warning doesn't appear in a normal terminal — only in commands run by Zoo Code.

Reproduction steps

On a Linux system (tested on WSL2/Arch Linux) generate only your local locale, e.g. en_AU.UTF-8, and confirm en_US.UTF-8 is NOT listed by locale -a
Make sure the system locale is set correctly (LANG=en_AU.UTF-8 in /etc/locale.conf)
Open a project in Zoo Code (VSCode Remote-WSL) and ask it to run any simple command, e.g. echo hello
Observe the command output

Expected result

The command runs cleanly with the system's locale (en_AU.UTF-8), with no locale warnings.

Actual result

Every command output is prefixed with: /bin/sh: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8): No such file or directory The warning appears only in Zoo Code-spawned shells. A normal interactive terminal on the same machine shows no warning, confirming the system config is correct and Zoo Code is overriding it.

Variations tried (optional)

Switching Zoo Code's UI language (e.g., to another locale) — the warning and the injected en_US.UTF-8 did not change at all
Setting the locale via ~/.vscode-server/server-env-setup (which correctly sets LANG=en_AU.UTF-8 on the VSCode server process) — the server itself then runs with the correct locale, but Zoo Code-spawned command shells still get en_US.UTF-8
Generating the en_US.UTF-8 locale as a workaround — the warning disappears (but this is a workaround, not a fix)

App Version

v3.74.0

API Provider (optional)

None

Model Used (optional)

No response

Zoo Code Task Links (optional)

No response

Relevant logs or errors (optional)

Root cause found in the extension bundle (dist/extension.js). The locale is a hardcoded literal (appears exactly once in the whole bundle, unrelated to any language/locale setting):

env: {...RKe.default.env, LANG: "en_US.UTF-8", LC_ALL: "en_US.UTF-8"}

Shell environment of a command spawned by Zoo Code (parent processes all have the correct en_AU.UTF-8):

LANG=en_US.UTF-8
LC_ALL=en_US.UTF-8

Suggested fix: inherit the server/host locale instead of hardcoding it (e.g., only set LANG/LC_ALL if not already present, or make it configurable like VSCode's terminal.integrated.env.linux).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions