Repository navigation
Fix handling of filepaths in migration - #552
Merged
Merged
Conversation
PatTheMav
requested changes
Oct 16, 2026
Warchamp7
force-pushed
the
u8-file-path-fixes
branch
from
October 16, 2026 19:05
f44dd1f to
40e49cb
Compare
Passing a std::string to std::filesystem will use the system codepage. On Windows, this means it will interpret const char* as ANSI but the paths returned by libobs are utf8. If the path only contains ASCII characters, then everything is fine. If the path contains non ASCII characters, then it leads to errors.
Warchamp7
force-pushed
the
u8-file-path-fixes
branch
from
October 16, 2026 19:13
40e49cb to
674e235
Compare
PatTheMav
approved these changes
Oct 16, 2026
RytoEX
approved these changes
Oct 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Treat paths from libobs as explicitly utf8 when passing them to std::filesystem.
Motivation and Context
Passing a std::string to std::filesystem will use the system codepage.
On Windows, this means it will interpret const char* as ANSI but the paths returned by libobs are utf8.
If the path only contains ASCII characters, then everything is fine. If the path contains non ASCII characters, then it leads to errors.
How Has This Been Tested?
I removed the folders for my migrated browser settings and then launched OBS again to confirm data was still migrated.
I also tested with a separate user on my machine with a username written in Japanese, everything migrated correctly.
Types of changes
Checklist: