fs: can't require non-ASCII file paths in Shift-JIS filesystem
Đang mở
Chưa có ai nhận issue này.
fs
never-stale
windows
- Ngôn ngữ chính
- JavaScript
- Star
- 122k
- Fork
- 37.4k
- Merge trung bình
- 4 ngày 3 giờ
- Pull request đã merge (30 ngày)
- 272
Mô tả
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.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu trong hệ thống con fs bằng cách tái hiện trường hợp require đơn giản được mô tả trên Japanese Windows với hệ thống tệp Shift-JIS, sau đó so sánh với các đường dẫn ASCII và các hệ thống không phải Shift-JIS. Repository có thể tái hiện được liên kết và trường hợp REPL cung cấp các ví dụ ban đầu. Hoàn tất khi require tải thành công một đường dẫn không phải ASCII trong Shift-JIS mà không xảy ra việc tiến trình thoát như đã báo cáo.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- javascript, nodejs
- Lĩnh vực
- operating-systems
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Sôi nổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 48/100