Skip to content

bug(bash): Encoding error with pwsh on windows #2366

Closed

Description

@TomXPRIME

What happened

类似于opencode,在通过bash工具调用pwsh的时候,因为没有指定使用UTF-8编码,在CJK系统上会把中文显示成方块菱形

How to reproduce

在Windows电脑上要求模型通过bash工具输出带有中文的内容即可复现

Environment

Maka v0.1.6

  • Electron: 43.1.1
  • Node: 24.18.0
  • Chrome: 150.0.7871.114
  • Platform: Windows 10.0.26200
  • Arch: x64
  • Build: packaged

Logs, screenshots, or additional context

Image

Activity

  1. added
    bug
    on Aug 7, 2026
  2. added
    help wanted
    on Aug 8, 2026
  3. me2seeks commented on Aug 9, 2026

    @me2seeks
    Contributor

    I traced this on current main and can take it. Both the pipe and PTY paths decode PowerShell output as UTF-8, but the PowerShell session never sets its console/output encoding, so Windows PowerShell can emit CJK filenames in the host code page first. I’ll keep the fix at the shared spawn-plan seam, cover both paths, and preserve the existing command and exit-code behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bughelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions