Open
Description
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
require
such 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 fs.rmSync('速') crash without throw #56049, although it's an issue for a different method and doesn't mention the Shift-JIS requirement.
- The issue was found in bug: If a file named "ヘルプ.ts" is added to the "commands" folder, the bot fails to start. sapphiredev/pieces#460 for reference, which used
require
in 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 simplerequire
in 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.