diff --git a/distribution/changelog.txt b/distribution/changelog.txt index bd4046fcf5..cb7d84b4cf 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -3,6 +3,7 @@ - Feature: [#5993] Ride window prices can now be set via text input. - Feature: [#6998] Guests now wait for passing vehicles before crossing railway tracks. - Feature: [#7694] Debug option to visualize paths that the game detects as wide. +- Fix: [#7533] Screenshot is incorrectly named/file is not generated in CJK language. - Fix: [#7628] Always-researched items can be modified in the inventory list. - Fix: [#7643] No Money scenarios with funding set to zero. - Fix: [#7653] Finances money spinner is too narrow for big loans. diff --git a/src/openrct2/core/Imaging.cpp b/src/openrct2/core/Imaging.cpp index 19d27e5807..68152ef199 100644 --- a/src/openrct2/core/Imaging.cpp +++ b/src/openrct2/core/Imaging.cpp @@ -309,7 +309,12 @@ namespace Imaging return ReadFromFile(path, GetImageFormatFromPath(path)); default: { +#if _WIN32 + auto pathW = String::ToUtf16(path); + std::ifstream fs(pathW, std::ios::binary); +#else std::ifstream fs(path.data(), std::ios::binary); +#endif return ReadFromStream(fs, format); } } @@ -330,7 +335,12 @@ namespace Imaging break; case IMAGE_FORMAT::PNG: { +#ifdef _WIN32 + auto pathW = String::ToUtf16(path); + std::ofstream fs(pathW, std::ios::binary); +#else std::ofstream fs(path.data(), std::ios::binary); +#endif WritePng(fs, image); break; }