Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/fix-windows-utf8-console.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@googleworkspace/cli": patch
---

Force UTF-8 console output on Windows to prevent CP-1252 mojibake of non-ASCII characters
11 changes: 11 additions & 0 deletions crates/google-workspace-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,17 @@ async fn main() {
// Load .env file if present (silently ignored if missing)
let _ = dotenvy::dotenv();

// Windows: force UTF-8 console output to prevent CP-1252 mojibake of non-ASCII characters
#[cfg(target_os = "windows")]
{
extern "system" {
fn SetConsoleOutputCP(wCodePageID: u32) -> i32;
}
unsafe {
SetConsoleOutputCP(65001);
}
}

// Initialize structured logging (no-op if env vars are unset)
logging::init_logging();

Expand Down
Loading