PowerShell output displays garbled text on Windows when system codepage is Big5 (950)

Status Closed — duplicate
Maintainer reply None cached
Activity 3 comments · opened Apr 11, 2026 · closed Apr 14, 2026

Description

On Windows systems with system codepage set to Big5 (950), Claude Code executing PowerShell commands produces garbled output for multi-byte characters (Japanese, Traditional Chinese, Korean, etc.). This affects user experience in non-English regions.

Environment

  • OS: Windows 11 Pro 10.0.26200
  • System Codepage: 950 (Big5)
  • Shell: Git Bash (MSYS2)
  • Claude Code Version: v2.x

Steps to Reproduce

  1. Install Claude Code on Windows
  2. Execute PowerShell command with multi-byte characters:

``bash
powershell.exe -NoProfile -Command "Write-Host 'テスト中文'"
``

  1. Expected output: テスト中文
  2. Actual output: garbled text (e.g., �����)

---

Current Workaround

This can be resolved by creating a wrapper script:

# Create pwshutf8 wrapper
#!/bin/bash
powershell.exe -NoProfile -Command "[Console]::OutputEncoding=[Text.Encoding]::UTF8;$OutputEncoding=[Text.Encoding]::UTF8; $1"

However, this is not an ideal solution as it requires manual configuration by users.

---

Proposed Solutions

Option 1: Add Configuration Setting

Add encoding-related configuration to settings.json:

{
  "shell": {
    "powershell": {
      "encoding": "utf-8"
    }
  }
}

Option 2: Automatic Detection and Setting

Claude Code automatically detects system codepage and sets correct output encoding when executing PowerShell commands.

Option 3: Change Default Behavior

Default to UTF-8 encoding, with Big5 as fallback.

---

Impact

  • All Claude Code users on Windows in non-English regions (using Big5, EUC-KR, etc.)
  • Users who use PowerShell as their primary shell

---

Additional Notes

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗