-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
[Bug]: read tool fails to read GBK-encoded text files on Chinese Windows (displays garbled text) #92664
Copy link
Copy link
Closed
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.bugSomething isn't workingSomething isn't workingclawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.ClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:data-lossCan lose, corrupt, or silently drop user/session/config data.Can lose, corrupt, or silently drop user/session/config data.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.regressionBehavior that previously worked and now failsBehavior that previously worked and now fails
Description
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.bugSomething isn't workingSomething isn't workingclawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.ClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:data-lossCan lose, corrupt, or silently drop user/session/config data.Can lose, corrupt, or silently drop user/session/config data.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.regressionBehavior that previously worked and now failsBehavior that previously worked and now fails
Type
Fields
Priority
None yet
Bug type
Regression (worked before, now fails)
Beta release blocker
No
Summary
read tool displays garbled text when reading GBK-encoded files on Chinese Windows
Steps to reproduce
Use OpenClaw's read tool to read the file
Observe garbled text output (mojibake)
Expected behavior
The
readtool should correctly display Chinese text from GBK-encoded files, either by:encodingparameter to specify file encodingActual behavior
GBK-encoded files are decoded as UTF-8, resulting in garbled text (mojibake).
Example:
UTF-8 encoded files work correctly.
OpenClaw version
2026.6.1
Operating system
Windows 11 23H2 (Chinese Simplified)
Install method
npm global
Model
qwen/qwen3.5-plus
Provider / routing chain
qwen/qwen3.5-plus → gateway
Additional provider/model setup details
No response
Logs, screenshots, and evidence
Impact and severity
Affects Chinese Windows users when reading common GBK-encoded text files.
Workaround: Use exec with PowerShell to read files with explicit encoding, or convert files to UTF-8 first.
Additional information
添加 encoding 参数到 read 工具
或自动检测文件编码(通过 BOM 或内容分析)
或在 Windows 上默认使用系统编码