-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
gateway.vbs/gateway.cmd encoding issue on Windows with CJK username paths #107416
Copy link
Copy link
Closed
Closed
Copy link
Labels
P0Emergency: data loss, security bypass, crash loop, or unusable core runtime.Emergency: data loss, security bypass, crash loop, or unusable core runtime.clawsweeper: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:ux-release-blockerA non-technical user is blocked without terminal, logs, config, or support.A non-technical user is blocked without terminal, logs, config, or support.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.no-staleExclude from stale automationExclude from stale automation
Description
Metadata
Metadata
Assignees
Labels
P0Emergency: data loss, security bypass, crash loop, or unusable core runtime.Emergency: data loss, security bypass, crash loop, or unusable core runtime.clawsweeper: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:ux-release-blockerA non-technical user is blocked without terminal, logs, config, or support.A non-technical user is blocked without terminal, logs, config, or support.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.no-staleExclude from stale automationExclude from stale automation
Type
Fields
Priority
None yet
Problem
On Windows with a CJK (Chinese/Japanese/Korean) username, the gateway service fails to start because
gateway.vbsandgateway.cmdare written in UTF-8 encoding.Windows Script Host (wscript.exe) only supports ANSI (GBK on Chinese Windows) or UTF-16 LE BOM for .vbs files. When it reads the UTF-8 file, the CJK characters in the path (e.g.
C:\Users\苗振\.openclaw\gateway.cmd) become garbled, resulting in "file not found" errors.Similarly,
cmd.exeuses the system ANSI codepage (GBK/936), sogateway.cmdwith UTF-8 encoded Chinese paths also fails.Steps to Reproduce
C:\Users\苗振)iwr -useb https://openclaw.ai/install.ps1 | iexRoot Cause
In the installer,
gateway.vbsandgateway.cmdare written using default PowerShell encoding (UTF-8 without BOM). Windows Script Host and cmd.exe cannot decode CJK characters from UTF-8.Suggested Fix
When writing these files, use the appropriate encoding:
[System.Text.Encoding]::Unicode)[System.Text.Encoding]::DefaultorGetEncoding('gbk'))Example:
Environment
C:\Users\苗振