返回目录
模型与 MCP 插件

dsh-pwsh-cp

wannaknowhys/dsh-pwsh-cp

Pin every pwsh tool call to a UTF-8 console code page and Python UTF-8 mode

Stars
0
Forks
0
Issues
0
更新
9 天前

PROJECT TOPICS

项目标签

INSTALL REFERENCE

安装参考

未验证
dsh plugin --profile web add github:wannaknowhys/dsh-pwsh-cp

该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。

PROJECT README

README

English | 简体中文

dsh-pwsh-cp

npm version license

A DeepSeek Harness bundle for Windows hosts whose PowerShell console starts on a legacy OEM code page (936 on zh-CN, for example). It decorates the shell executor so every pwsh tool call begins with:

chcp 65001 *> $null; $env:PYTHONUTF8='1'; $env:PYTHONIOENCODING='utf-8';

Why

  • The harness decodes command output as UTF-8.
  • A fresh PowerShell process can still start on console code page 936. The shipped preamble sets [Console]::OutputEncoding = UTF8, but that does not move the console code page, so native tools keep writing GBK bytes into a UTF-8 decoder and non-ASCII text is lost.
  • Pinning the console to 65001 makes dir, CMD built-ins, and code-page-aware CLI tools emit UTF-8. CMD built-ins then answer in English instead of the system's localized language.
  • Piped Python writes the locale code page (GBK) regardless of the console; PYTHONUTF8=1 makes it write UTF-8.

What it does not do

  • It does not replace or disable pwsh-sandbox; confinement is unchanged.
  • It does not affect the embedded terminal or other profiles.
  • It does not preserve localized wording from legacy tools that ignore the console code page. Use a wrapper that can force the source code page when that matters.

Requirements

  • Windows with PowerShell 7 (pwsh).
  • A DeepSeek Harness build that provides the shell service and the pwsh tool.

Install / remove

# from npm
dsh plugin --profile desktop add dsh-pwsh-cp

# from a checkout
dsh plugin --profile desktop add github:wannaknowhys/dsh-pwsh-cp

# remove
dsh plugin --profile desktop remove dsh-pwsh-cp

The plugin manager accepts the same specs: install_bundle target = dsh-pwsh-cp or the checkout directory.

CLASSIFICATION EVIDENCE

分类依据

项目类型插件
功能分类模型与 MCP
规则置信度中

系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek-harness。