claude-code - 💡(How to fix) Fix Windows: context menu on file links mishandles non-ASCII paths (URL-encoded path sent to Explorer / clipboard) [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#52344Fetched 2026-04-24 06:09:39
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Timeline (top)
labeled ×3commented ×1

Root Cause

  1. 「エクスプローラーで表示」 (Reveal in Explorer): silently does nothing.
  2. 「パスをコピー」 (Copy path): copies the path with non-ASCII segments percent-encoded (e.g., %E5%9F%B7%E7%AD%86...). Pasting into Explorer's address bar fails, because Explorer treats %XX as literal characters.

Fix Action

Fix / Workaround

Current workaround

Ask Claude Code to print the decoded absolute path as plain text, then copy that manually.

Code Example

C:\Users\USER\OneDrive\ドキュメント\Claude\Projects\日本語プロジェクト/%E6%97%A5%E6%9C%AC%E8%AA%9E%E3%83%95%E3%82%A9%E3%83%AB%E3%83%80/%E6%97%A5%E6%9C%AC%E8%AA%9E%E3%82%B5%E3%83%96%E3%83%95%E3%82%A9%E3%83%AB%E3%83%80/%E6%97%A5%E6%9C%AC%E8%AA%9E%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E5%90%8D.docx
RAW_BUFFERClick to expand / collapse

Environment

  • OS: Windows 11 Pro (10.0.26200)
  • Claude Code on Windows
  • Project path contains Japanese characters (under OneDrive)

Bug

When right-clicking a markdown file link in the chat whose target contains non-ASCII characters (Japanese):

  1. 「エクスプローラーで表示」 (Reveal in Explorer): silently does nothing.
  2. 「パスをコピー」 (Copy path): copies the path with non-ASCII segments percent-encoded (e.g., %E5%9F%B7%E7%AD%86...). Pasting into Explorer's address bar fails, because Explorer treats %XX as literal characters.

Example copied path for a file at 日本語プロジェクト/日本語フォルダ/日本語サブフォルダ/日本語ファイル名.docx:

C:\Users\USER\OneDrive\ドキュメント\Claude\Projects\日本語プロジェクト/%E6%97%A5%E6%9C%AC%E8%AA%9E%E3%83%95%E3%82%A9%E3%83%AB%E3%83%80/%E6%97%A5%E6%9C%AC%E8%AA%9E%E3%82%B5%E3%83%96%E3%83%95%E3%82%A9%E3%83%AB%E3%83%80/%E6%97%A5%E6%9C%AC%E8%AA%9E%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E5%90%8D.docx

Note: only the relative-path portion (from the markdown link href) is percent-encoded; the project root prefix is preserved as raw Japanese. This indicates the path is assembled from a percent-encoded href and handed to OS APIs without being URL-decoded first.

Reproduction

  1. On Windows, use a project whose path contains Japanese characters.
  2. Have Claude Code create or reference a file under a Japanese subfolder.
  3. Right-click the resulting markdown link in the chat → try "エクスプローラーで表示" or "パスをコピー".

Expected

  • "Reveal in Explorer" opens Explorer with the file selected.
  • "Copy path" returns the raw Windows path (no percent-encoding).

Current workaround

Ask Claude Code to print the decoded absolute path as plain text, then copy that manually.

Likely fix

URL-decode the link target before invoking the Shell/Explorer APIs and before placing it on the clipboard.

extent analysis

TL;DR

URL-decode the markdown link target before invoking Shell/Explorer APIs or copying to the clipboard to fix the issue with non-ASCII characters in Windows file paths.

Guidance

  • Verify that the issue is specific to Windows and non-ASCII characters in file paths by testing with ASCII-only paths and on other operating systems.
  • Check the code responsible for generating the markdown link and copying the path to ensure it correctly handles URL encoding and decoding.
  • Consider using a library or function that can handle URL decoding and Windows path encoding correctly, such as decodeURIComponent in JavaScript.
  • Test the fix by creating a file with a non-ASCII name and path, and verifying that "Reveal in Explorer" and "Copy path" work as expected.

Example

const decodedPath = decodeURIComponent(linkTarget);
// Use decodedPath when invoking Shell/Explorer APIs or copying to the clipboard

Notes

This fix assumes that the issue is due to incorrect handling of URL encoding and decoding. If the issue persists after applying this fix, further investigation may be needed to determine the root cause.

Recommendation

Apply the workaround of URL-decoding the link target before invoking Shell/Explorer APIs or copying to the clipboard, as this is a targeted fix that addresses the specific issue with non-ASCII characters in Windows file paths.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING