mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 13:57:57 -07:00
86910f406e
In std::string, you can store strings using any encoding, but in Dolphin we have decided to use UTF-8. The problem is that if you convert between std::string and std::filesystem::path using the built-in methods, the standard library will make up its own assumption of what encoding you're using in the std::string. On most OSes this is UTF-8, but on Windows it's whatever the user's code page is. What I believe is the C++ standard authors' intended solution to this is to use std::u8string instead of std::string, but that's a big hassle to move over to, because there's no convenient way to convert between std::string and std::u8string. Instead, in Dolphin, we have added helper functions that convert between std::string and std::filesystem::path in the manner we want. You *always* have to use these when converting between std::string and std::filesystem::path, otherwise we get these kinds of encoding problems that we've been having with custom textures. Fixes https://bugs.dolphin-emu.org/issues/13328. |
||
---|---|---|
.. | ||
AudioCommon | ||
Common | ||
Core | ||
DiscIO | ||
DolphinNoGUI | ||
DolphinQt | ||
DolphinTool | ||
InputCommon | ||
MacUpdater | ||
UICommon | ||
UpdaterCommon | ||
VideoBackends | ||
VideoCommon | ||
WinUpdater | ||
CMakeLists.txt | ||
DolphinLib.ARM64.props | ||
DolphinLib.props | ||
DolphinLib.vcxproj | ||
DolphinLib.vcxproj.user | ||
DolphinLib.x64.props |