fix(libc): open fopen and freopen paths through the wide CRT on Windows #2588
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2588"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-10T07:12:14Z.
What
On Windows, the guest
fopenandfreopenpass the resolved path to the narrow CRT, which reads it in the ANSI code page. UTF-8 guest file names are garbled: a guest that writesセーブé.tmpwithfopencreates a host file namedセーブé.tmpand cannot read it back.fopennow uses_wfopenandfreopenuses_wfreopenwith the path asstd::filesystem::path. Other platforms are unchanged.FileStream::Reopentakes a path instead of a narrow string.Fixes #2329. Same approach as #2335 for directory entries.
Tested
Windows 10 (19045), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release,
BUILD_TESTING=ON.file_streamshas a new case: write, read back andfreopenofセーブé.tmp, checking the name and size on disk. It fails on currentmain(the file is created asセーブé.tmp) and passes with this change.TEMPandTMPon an excluded directory all 11 pass.video_out_flip_controlscrashed in the parallel run and is skipped when run alone.agc_driver_f32_arithmetic_nanfails on an NVIDIA RTX 4080 SUPER (0x7fc12345instead of0x7f812345inv_fmamk_f32); it does not touch libc, but I did not run it on an unmodifiedmain.tools/check_conventions.pypasses.Linux, macOS, PS5 hardware and titles: not tested.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-10T07:12:58Z.
Thank you for your interest in the project! We are sorry, but we cannot accept more PRs while we work through the existing backlog. This PR has been automatically closed and labeled "intake paused". This is not a judgment of the quality of your changes.
Pull request closed