frontend: Fix character encoding issue during profile import
The directory name string passed into libobs functions needs to be converted into a 8-bit-based encoding (e.g., UTF-8) to avoid mangling of characters and encoding issues particularly on Windows systems which use UTF-16 for file names.
This commit is contained in:
parent
33734ef99c
commit
16216b2e30
1 changed files with 1 additions and 1 deletions
|
|
@ -554,7 +554,7 @@ void OBSBasic::on_actionImportProfile_triggered()
|
|||
|
||||
if (!sourceDirectory.isEmpty() && !sourceDirectory.isNull()) {
|
||||
const std::filesystem::path sourcePath = std::filesystem::u8path(sourceDirectory.toStdString());
|
||||
const std::string directoryName = sourcePath.filename().string();
|
||||
const std::string directoryName = sourcePath.filename().u8string();
|
||||
|
||||
if (auto profile = GetProfileByDirectoryName(directoryName)) {
|
||||
OBSMessageBox::warning(this, QTStr("Basic.MainMenu.Profile.Import"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue