Fix Unicode paths on Windows #716
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
GPU
GUI
help wanted
question
Shaders
Video
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/KytyPS5--KytyPS5!716
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/716/head"
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?
@AghastyGD on GitHub · 2026-09-19 13:51 UTC · original
AghastyGD:fix/windows-unicode-paths→main· +194 −119 · 9 files · 5 commits · merged 2026-09-19 22:14 UTCCloses #714
Root cause
Windows uses UTF-16 for native filesystem paths, but some paths were being converted through UTF-8 strings and later reconstructed as narrow
std::filesystem::pathvalues.This works for ASCII paths, but can break paths containing characters such as
éor Japanese characters depending on the active Windows code page.One place where this caused a problem was module discovery. During
sce_moduleenumeration, the game path went through astd::filesystem::path-> UTF-8std::string-> narrowstd::filesystem::pathround trip before reaching the wide Win32 APIs.With a Unicode game path, module enumeration could fail silently. In my case,
libc.prxwas not discovered, which later resulted in an unresolvedlibc_v1import and a crash in the runtime linker.The same kind of conversion also affected other paths, including command-line arguments and icon loading.
Fix
std::filesystem::pathvalues native during Windows filesystem operations.wmain()and convert them to UTF-8 before parsing.--game-patch.Test
Tested locally on Windows with a Debug
clang-clbuild.I tested the same game using:
TesteTestéTest日本語Before the fix, only the ASCII path worked correctly. After the fix, all three work. The game is detected, the icon loads,
sce_moduleis enumerated correctly, and the required modules are loaded.The Unicode filesystem regression tests pass locally.
kernel_file_system_testscurrently requires the Windows linking fix from #712 to build. After applying the equivalent fix locally, the test binary runs and reaches the existing unrelated socket failure:guest PEEK and WAITALL preserve the wake bytes@coderabbitai[bot] on GitHub · 2026-09-19 13:56 UTC · original · edited 2026-09-19 15:57 UTC
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: Repository: KytyPS5/KytyPS5/.coderabbit.yaml
Review profile: CHILL
Plan: Advanced
Run ID:
43651441-65fa-4e06-bb9c-a3e7ae63dd0e📥 Commits
Reviewing files that changed from the base of the PR and between
8b294eb5b8andfe45265fcd.📒 Files selected for processing (2)
src/common/file.cpptests/KernelFileSystemTests.cppIncluded review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.
📝 Walkthrough
Walkthrough
The change replaces string-based path handling with
std::filesystem::pathacross directory operations, Windows enumeration, mount resolution, icon loading, command-line inputs, and system content APIs. It adds UTF-8 path conversion and a Windowswmainwrapper. Filesystem tests now cover Unicode directories and filenames.Suggested reviewers:
nmzikPriority: ➖ Normal
Change: Bug fix · Severity of issue fixed: Medium
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
#714requires game detection and loading to work with Unicode paths on Windows. The PR converts Windows arguments throughwmain(), converts UTF-8 path inputs withCommon::PathFromUtf8, and p…#714. The path conversion helper, native path propagation, Windows wide-argument entry point, wide filesystem enumeration, icon and patch handling, directory handling, and Un…Comment
@coderabbitai helpto get the list of available commands.@coderabbitai[bot] on GitHub · 2026-09-19 13:56 UTC · original · reviewed
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: KytyPS5/KytyPS5/.coderabbit.yaml
Review profile: CHILL
Plan: Advanced
Run ID:
ce257984-3bce-4f38-8f99-acdd086b93cd📥 Commits
Reviewing files that changed from the base of the PR and between
f100f785daand8b294eb5b8.📒 Files selected for processing (9)
src/common/file.cppsrc/common/platform/sysWindowsFileIO.cppsrc/common/stringUtils.hsrc/graphics/presentation/window/window.cppsrc/kernel/fileSystem.cppsrc/loader/systemContent.cppsrc/loader/systemContent.hsrc/main.cpptests/KernelFileSystemTests.cppIncluded review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.