fs: can't require non-ASCII file paths in Shift-JIS filesystem
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 48/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- javascript, nodejs
调研方向
从 fs 子系统开始,在使用 Shift-JIS 文件系统的 Japanese Windows 上重现所描述的简单 require 情况,然后将其与 ASCII 路径和非 Shift-JIS 系统进行比较。链接的可复现 repository 和 REPL 情况提供了起始示例。当 require 能够在 Shift-JIS 下成功加载非 ASCII 路径,且没有出现所报告的进程退出时,即视为完成。
由索引模型根据 Issue 内容生成。
描述
Version
v22.13.0, v23.6.0
Platform
Microsoft Windows NT 10.0.26100.0 x64
Subsystem
fs
What steps will reproduce the bug?
- Use Japanese Windows with
Shift-JIS(akaCP932) - Load a non-ASCII file path with
requiresuch asヘルプ.js
How often does it reproduce? Is there a required condition?
Always reproduceable under a Shift-JIS filesystem.
What is the expected behavior? Why is that the expected behavior?
The file is loaded correctly.
What do you see instead?
"Process exited with code 3221225477"
Additional information
- May be similar to https://github.com/nodejs/node/issues/56049, although it's an issue for a different method and doesn't mention the Shift-JIS requirement.
- The issue was found in https://github.com/sapphiredev/pieces/issues/460 for reference, which used
requirein the user's case, the aforementioned issue also links a reproducible example repository, although not a minimal one for testing purposes, the issue has been reproduced with a simplerequirein REPL as well. - The same code works fine:
- If the filesystem isn't Shift-JIS (UNIX, non-Japanese Windows).
- ASCII names are used instead.
- When run with an alternative runtime such as Deno.
- 主要语言
- JavaScript
- 星标
- 122k
- 派生
- 37.4k
- 平均合并
- 4 天 3 小时
- 30 天内合并 PR
- 272
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
nodejs/node 的其他 Issue
-
doc
难度 2/5 1-3 小时 新手友好度 65/100
-
build
难度 1/5 1 小时以内 新手友好度 88/100
-
难度 2/5 1-3 小时 新手友好度 84/100
-
难度 1/5 1 小时以内 新手友好度 90/100
-
feature request
难度 2/5 1-3 小时 新手友好度 68/100
相似的 Issue
-
code-quality refactoring
难度 2/5 1-3 小时 新手友好度 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
难度 2/5 1-3 小时 新手友好度 74/100
langchain-ai/deepagents#6450 ·
-
optimization optimization:agents-md-curator
难度 2/5 1-3 小时 新手友好度 86/100
githubnext/gh-aw-cao#13143 ·
-
status: needs triage
难度 2/5 1-3 小时 新手友好度 88/100
-
难度 2/5 1-3 小时 新手友好度 88/100