From e954e552137371f5998b2faf449f744d6c2b130f Mon Sep 17 00:00:00 2001 From: Yousef Khadadeh Date: Fri, 21 Nov 2025 10:03:11 +0300 Subject: [PATCH] Enable UTF-8 in windows app manifest --- CMakeLists.txt | 1 + src/DrawingProgram/DrawingProgram.hpp | 2 +- src/ResourceManager.cpp | 4 ++-- windowsinstall/infinipaint.manifest | 11 +++++++++++ 4 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 windowsinstall/infinipaint.manifest diff --git a/CMakeLists.txt b/CMakeLists.txt index e1eb544..0ab05f9 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -132,6 +132,7 @@ endif() if(WIN32) list(APPEND sources "src/WindowsFontData/CustomFontSetManager.cpp" + "windowsinstall/infinipaint.manifest" "windowsinstall/app.rc") endif() diff --git a/src/DrawingProgram/DrawingProgram.hpp b/src/DrawingProgram/DrawingProgram.hpp index ed8ed49..28371cc 100644 --- a/src/DrawingProgram/DrawingProgram.hpp +++ b/src/DrawingProgram/DrawingProgram.hpp @@ -80,7 +80,7 @@ class DrawingProgram { bool addToCompCacheOnInsert = true; std::atomic addFileInNextFrame = false; - std::pair addFileInfo; + std::pair addFileInfo; void add_file_to_canvas_by_path_execute(const std::filesystem::path& filePath, Vector2f dropPos); diff --git a/src/ResourceManager.cpp b/src/ResourceManager.cpp index 61ff2bd..d2100c9 100644 --- a/src/ResourceManager.cpp +++ b/src/ResourceManager.cpp @@ -69,7 +69,7 @@ ServerClientID ResourceManager::add_resource_file(const std::filesystem::path& f // https://nullptr.org/cpp-read-file-into-string/ std::ifstream file(filePath, std::ios::in | std::ios::binary | std::ios::ate); if(!file.is_open()) { - Logger::get().log("INFO", "[ResourceManager::add_resource_file] Could not open file " + std::string(filePath)); + Logger::get().log("INFO", "[ResourceManager::add_resource_file] Could not open file " + filePath.string()); return {0, 0}; } @@ -78,7 +78,7 @@ ServerClientID ResourceManager::add_resource_file(const std::filesystem::path& f auto tellgResult = file.tellg(); if(tellgResult == -1) { - Logger::get().log("INFO", "[ResourceManager::add_resource_file] tellg failed for file " + std::string(filePath)); + Logger::get().log("INFO", "[ResourceManager::add_resource_file] tellg failed for file " + filePath.string()); return {0, 0}; } diff --git a/windowsinstall/infinipaint.manifest b/windowsinstall/infinipaint.manifest new file mode 100644 index 0000000..6839783 --- /dev/null +++ b/windowsinstall/infinipaint.manifest @@ -0,0 +1,11 @@ + + + + + + + UTF-8 + + + +