From 003a2d3757c3df4a048b1bb966fd70e26903a021 Mon Sep 17 00:00:00 2001 From: Yousef Khadadeh Date: Fri, 21 Nov 2025 08:39:48 +0300 Subject: [PATCH] Path field in infinipaint filepicker uses UTF8 on Windows --- src/GUIStuff/GUIManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GUIStuff/GUIManager.cpp b/src/GUIStuff/GUIManager.cpp index 55149b4..77e5cea 100644 --- a/src/GUIStuff/GUIManager.cpp +++ b/src/GUIStuff/GUIManager.cpp @@ -540,7 +540,7 @@ void GUIManager::input_path(const std::string& id, std::filesystem::path* val, s push_id(id); insert_element>()->update(*io, val, [&](const std::string& a) { - std::filesystem::path toRet = std::filesystem::path(a); + std::filesystem::path toRet = std::filesystem::path(std::u8string_view(reinterpret_cast(a.c_str()), a.length())); if(fileTypeRestriction != std::filesystem::file_type::none && std::filesystem::status(toRet).type() != fileTypeRestriction) return std::optional(std::nullopt); return std::optional(toRet);