What happened?
When executing shell commands through Gemini CLI in a Windows (win32) environment using PowerShell, Korean characters (UTF-8) passed as string arguments are corrupted or garbled in the target application's output (e.g., git commit -m or gh pr create --title).
For example, running: git commit -m "feat : SecurityConfig CORS AllowedOrigins ngrok URL 추가" Results in: feat : SecurityConfig CORS AllowedOrigins ngrok URL 異媛
This seems to be caused by an encoding mismatch between the CLI's command execution layer and the PowerShell environment (likely expecting CP949 or another local encoding instead of UTF-8).
What did you expect to happen?
Korean characters (and other non-ASCII characters) should be preserved correctly when passed as arguments to shell commands like git or gh.
Client information
Client Information
Run gemini to enter the interactive CLI, then run the /about command.
> /about
# Version: 0.29.7
# Platform: win32 (Windows)
Login information
Google Account (Gemini CLI Default)
Anything else we need to know?
- Workaround identified: Writing the content to a temporary text file (UTF-8) and using file flags (e.g.,
git commit -F msg.txt or gh pr create --body-file body.md) preserves the characters correctly.
- Environment: This consistently occurs on Windows 10/11 when using the default PowerShell terminal through Gemini CLI's
run_shell_command or direct command execution.
- Root Cause Susicion: The CLI might be piping strings to the shell without explicitly setting the shell's input encoding or handle types to UTF-8 on Windows.
What happened?
When executing shell commands through Gemini CLI in a Windows (win32) environment using PowerShell, Korean characters (UTF-8) passed as string arguments are corrupted or garbled in the target application's output (e.g., git commit -m or gh pr create --title).
For example, running: git commit -m "feat : SecurityConfig CORS AllowedOrigins ngrok URL 추가" Results in: feat : SecurityConfig CORS AllowedOrigins ngrok URL 異媛
This seems to be caused by an encoding mismatch between the CLI's command execution layer and the PowerShell environment (likely expecting CP949 or another local encoding instead of UTF-8).
What did you expect to happen?
Korean characters (and other non-ASCII characters) should be preserved correctly when passed as arguments to shell commands like git or gh.
Client information
Client Information
Run
geminito enter the interactive CLI, then run the/aboutcommand.Login information
Google Account (Gemini CLI Default)
Anything else we need to know?
git commit -F msg.txtorgh pr create --body-file body.md) preserves the characters correctly.run_shell_commandor direct command execution.