Skip to content

[BUG] Claude code bash command execution, output Chinese characters appear as garbled text #7332

Description

@zhatlas

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

My system environment is Windows 10, Windows Terminal, Git Bash, Claude Code 1.0.109.

When executing commands with Chinese output, the output shows garbled characters.

Image

What Should Happen?

Should display Chinese characters

Image

Error Messages/Logs

Steps to Reproduce

NA

Claude Model

None

Is this a regression?

No, this never worked

Last Working Version

No response

Claude Code Version

1.0.109

Platform

Other

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

This is caused by inconsistencies in the multi-layer encoding chain——the bash end is typically set to UTF-8, while the called native Windows commands/external programs (especially PowerShell 5, cmd tools) use the console code page (OEM/ANSI) or UTF-16/CPxxxx in the pipeline, resulting in a mismatch at both ends, naturally causing byte errors.

You can refer to this issue: google-gemini/gemini-cli#1945

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:toolsbugSomething isn't workinghas reproHas detailed reproduction stepsplatform:windowsIssue specifically occurs on Windows

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions