Enable UTF-8 in windows app manifest

This commit is contained in:
Yousef Khadadeh 2025-11-21 10:03:11 +03:00
parent 003a2d3757
commit e954e55213
4 changed files with 15 additions and 3 deletions

View file

@ -132,6 +132,7 @@ endif()
if(WIN32)
list(APPEND sources
"src/WindowsFontData/CustomFontSetManager.cpp"
"windowsinstall/infinipaint.manifest"
"windowsinstall/app.rc")
endif()

View file

@ -80,7 +80,7 @@ class DrawingProgram {
bool addToCompCacheOnInsert = true;
std::atomic<bool> addFileInNextFrame = false;
std::pair<std::string, Vector2f> addFileInfo;
std::pair<std::filesystem::path, Vector2f> addFileInfo;
void add_file_to_canvas_by_path_execute(const std::filesystem::path& filePath, Vector2f dropPos);

View file

@ -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};
}

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="0.3.0.0" processorArchitecture="*" name="com.infinipaint.infinipaint" type="win32" />
<!-- Enable UTF-8 -->
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<activeCodePage xmlns="http://schemas.microsoft.com/SMI/2019/WindowsSettings">UTF-8</activeCodePage>
</windowsSettings>
</application>
<!-- Enable DPI Awareness -->
</assembly>