C:/Program Files/Git/resume clipboard command garbles non-ASCII paths (Japanese) on Windows
Problem
When using /resume to resume a session from a different directory on Windows, the command copied to clipboard (cd 'path' && claude --resume sessionid) garbles non-ASCII characters in the path.
Example:
- Actual path:
C:\Users\username\デスクトップ\project - Clipboard result:
cd 'C:\Users\username\繝・せ繧ッ繝医ャ繝予\project' && claude --resume sessionid
The garbled text (繝・せ繧ッ繝医ャ繝予) is a classic UTF-8 → Shift-JIS (CP932) mojibake of デスクトップ, suggesting the clipboard write is using the wrong encoding.
Environment
- OS: Windows 11 Home (Japanese locale)
- Shell: PowerShell 7 (also reproduced on PowerShell 5.1)
- System codepage: CP932 (Shift-JIS)
Expected behavior
The clipboard should contain the correct path with Japanese characters preserved.
Additional context
This also affects && usage on older PowerShell 5.1 (which doesn't support &&), but the encoding issue persists even after upgrading to PowerShell 7.
Workaround
Using an ASCII-only junction (mklink /J C:\project C:\Users\...\デスクトップ\project) to avoid non-ASCII paths entirely.
Feature request
It would also be helpful to have a configurable clipboard format for /resume, or a setting to customize how cross-directory resume commands are generated.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗