FIX: [STUDIO-4164] charset problem in load printer config

Change-Id: Id1ee5108b70e926f822ca4f12715bd2255e5c272
(cherry picked from commit 8ea1abc1df9d1d1680f20c4f9f423360b9318ceb)
This commit is contained in:
chunmao.guo 2023-08-23 14:24:12 +08:00 committed by Lane.Wei
parent ca32032654
commit dcb006535a
2 changed files with 2 additions and 2 deletions

View File

@ -5056,7 +5056,7 @@ json DeviceManager::filaments_blacklist = json::object();
std::string DeviceManager::get_string_from_config(std::string type_str, std::string item)
{
std::string config_file = Slic3r::resources_dir() + "/printers/" + type_str + ".json";
std::ifstream json_file(config_file.c_str());
boost::nowide::ifstream json_file(config_file.c_str());
try {
json jj;
if (json_file.is_open()) {

View File

@ -83,7 +83,7 @@ bool json_diff::load_compatible_settings(std::string const &type, std::string co
printer_version = version2;
settings_base.clear();
std::string config_file = Slic3r::resources_dir() + "/printers/" + type2 + ".json";
std::ifstream json_file(config_file.c_str());
boost::nowide::ifstream json_file(config_file.c_str());
try {
json versions;
if (json_file.is_open()) {