Files
Thomas MartinandClaude Opus 5.5 9382d272c8 Windows: the UTF-8 process code page for ps2_recomp, ps2_vu_aot and ps2EntryRunner (a manifest), so a path with characters outside the ANSI code page (C:\Users\Jérôme\Jeux) opens
Found by TMB's release test, unzipped into "D:\tmb_rel_test\Jérôme Jeux": ps2_recomp read the TOML (its path in argv
is representable in cp1252) but not the ELF it names ("Could not load ELF file"): TOML is UTF-8 and ELFIO opens the
file with a narrow std::ifstream, which Windows reads in the ANSI code page. The tools and the runner use narrow APIs
throughout (fopen, std::ifstream on std::string, getenv, main's argv), so rather than widening each call:

- cmake/windows/utf8.manifest: activeCodePage UTF-8 (Windows 10 1903+), plus what MSYS2's default manifest says
  (asInvoker, the Windows 10/11 supportedOS ids), since this RT_MANIFEST 1 takes its place.
- cmake/windows/Ps2xUtf8CodePage.cmake: ps2x_utf8_code_page(<target>), on by PS2X_WINDOWS_UTF8: MinGW gets a
  resource script naming the manifest (RT_MANIFEST 1, the directory enables RC), MSVC the .manifest source.
- Applied to ps2_recomp and ps2_vu_aot (ps2xRecomp) and ps2EntryRunner (ps2xRuntime, not Android).

Checked with the build kit's GCC: a test program with the resource reports GetACP() = 65001 (1252 without).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-01 21:36:46 +01:00
..
2026-09-19 21:31:44 -03:00