fs: can't require non-ASCII file paths in Shift-JIS filesystem
Offen
Dieses Issue hat noch niemand übernommen.
fs
never-stale
windows
- Vorherrschende Sprache
- JavaScript
- Sterne
- 122k
- Forks
- 37.4k
- Ø Merge
- 4 T. 2 Std.
- Gemergte PRs (30 T.)
- 283
Beschreibung
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.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne im fs-Subsystem, indem du den einfachen require-Fall unter Japanese Windows mit einem Shift-JIS-Dateisystem reproduzierst, und vergleiche ihn anschließend mit ASCII-Pfaden und Nicht-Shift-JIS-Systemen. Das verlinkte reproduzierbare Repository und der REPL-Fall bieten Ausgangsbeispiele. Erledigt ist es, wenn require einen Pfad mit Nicht-ASCII-Zeichen unter Shift-JIS erfolgreich lädt, ohne dass der gemeldete Prozess beendet wird.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript, nodejs
- Bereich
- operating-systems
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Aktiv
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 48/100