dsh-fs-encoding
文件编码守护:为 GBK、Big5、Shift-JIS、EUC-KR、Windows-125x、UTF-16、UTF-32 文件提供字节级无损读写与编辑,改完仍是原编码而不是被悄悄转成 UTF-8;UTF-8 BOM 原样保留,CRLF/LF/CR 换行符保持,编码表示不了的字符拒绝写入而不是写成「?」;非 UTF-8 文件会列出候选编码,模型可显式指定重读。
File encoding guard: byte-exact read/write/edit for GBK, Big5, Shift-JIS, EUC-KR, Windows-125x, UTF-16 and UTF-32 files, so editing a legacy file leaves it in its original encoding instead of silently rewriting it as UTF-8; UTF-8 BOM preserved exactly as it was, line endings (CRLF/LF/CR) kept, characters the encoding cannot represent refused rather than written as "?", and non-UTF-8 files listed with candidate encodings so the model can re-read them explicitly.
怎么安装
dsh plugin add dsh-fs-encoding 简介
dsh-fs-encoding — DSH 文件编码守护 为 DeepSeek Harness(DSH)提供的文件编码治理插件:让 AI 读写文件时不再弄坏 BOM 与多字节编码 **🌏 中文 | English** dsh · dsh-plugin · plugin · encoding · BOM · GBK · Big5 · Shift-JIS · UTF-16 · AI agent · 编码 · 文件编码 · 乱码 简介 DSH 自带的 read / write / edit 三个文件工具**只认 UTF-8**,遇到中文、日文、韩文项目里常见的编码就会出问题: **GBK、Big5、Shift-JIS 等编码的文件根本读不了**,直接报 invalid UTF-8 text,AI 只能干看着; **带 BOM 的 UTF-8 文件能读,但 BOM 会被悄悄吃掉**——AI 随手改一次,文件开头那三个字节就没了。对 PHP、旧版编译器、部分 Windows 软件来说,文件头少了 BOM 就可能解析出错或直接乱码; 更麻烦的是**没有任何警告**:你只会在某天发现文件坏了,却不知道是哪次编辑弄坏的。 本插件接管这三个工具,在**完整保留原有行为**(沙箱围栏、读后写保护、版本校验、diff 展示)的前提下,让非 UTF-8 文件和 BOM 都能正确读写:**文件原来是什么编…
推荐参考
信息
- 协议
- MIT
- 语言
- TypeScript
- GitHub 星标
- 4
- 月下载
- –
- 最近更新
- 2026-09-20
- 创建于
- 2026-09-14
基础安全检查
- 检查结果
- 无
- 收录来源
- curated:awesome-dsh-plugin.com, curated:awesome-dsh-plugin/awesome-dsh-plugin
- 主题标签
- dsh, dsh-plugin, dsh-plugins, encoding