Skip to content

Open source Grok Bot alternative, Bring your own agent and subscription: message Claude Code, Codex, Gemini CLI, Cursor, Copilot and 40+ AI agents as bots on your own computer, from iPhone, Mac, Windows, Linux or terminal. Agent-agnostic and free. Also a Muse and Dots alternative. Built in Rust.

test(host): read the host's UTF-8 in Python fixtures on Windows

leepokaia5703b0c1d32
diff --git a/host/tests/common/mod.rs b/host/tests/common/mod.rs
index 861889aa..e36832f0 100644
--- a/host/tests/common/mod.rs
+++ b/host/tests/common/mod.rs
@@ -54,13 +54,14 @@ pub fn python() -> &'static str {
if cfg!(windows) { "python" } else { "python3" }
}
-/// The agent command that runs a Python fixture (quoted for `sh -c` / `cmd /c`).
+/// The agent command that runs a Python fixture (quoted for `sh -c` / `cmd /c`). UTF-8 mode makes it read the host's
+/// UTF-8 the way real agents do: Windows Python reads pipes in the ANSI code page, turning a `”` into a lone surrogate.
pub fn python_agent(script: &Path) -> String {
let path = script.display().to_string();
if cfg!(windows) {
- format!("{} -u \"{path}\"", python())
+ format!("{} -X utf8 -u \"{path}\"", python())
} else {
- format!("{} -u '{}'", python(), path.replace('\'', "'\\''"))
+ format!("{} -X utf8 -u '{}'", python(), path.replace('\'', "'\\''"))
}
}