diff --git a/src/fs.h b/src/fs.h --- a/src/fs.h +++ b/src/fs.h @@ -9,7 +9,6 @@ #include #include -#include #include /** Filesystem operations and types */ diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -41,7 +41,6 @@ #include #endif -#include #include #include @@ -65,8 +64,6 @@ #include #endif -static fs::detail::utf8_codecvt_facet utf8; - #if defined(Q_OS_MAC) // These Mac includes must be done in the global namespace #include @@ -889,11 +886,11 @@ } fs::path qstringToBoostPath(const QString &path) { - return fs::path(path.toStdString(), utf8); + return fs::path(path.toStdString()); } QString boostPathToQString(const fs::path &path) { - return QString::fromStdString(path.string(utf8)); + return QString::fromStdString(path.string()); } QString formatDurationStr(int secs) { diff --git a/src/util.cpp b/src/util.cpp --- a/src/util.cpp +++ b/src/util.cpp @@ -1135,7 +1135,11 @@ // A dummy locale is used to extract the internal default locale, used by // fs::path, which is then used to explicitly imbue the path. std::locale loc = fs::path::imbue(std::locale::classic()); +#ifndef WIN32 fs::path::imbue(loc); +#else + fs::path::imbue(std::locale(loc, new std::codecvt_utf8_utf16())); +#endif } bool SetupNetworking() {