From 430268224d71bfc6a359f20c6db712462ce0bb25 Mon Sep 17 00:00:00 2001 From: rbrunner7 Date: Thu, 22 Feb 2018 19:52:55 +0100 Subject: Wallet2 + CLI wallet: UTF-8 support for filenames and paths under Windows --- src/wallet/api/wallet.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/wallet/api/wallet.cpp') diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp index 5ce8ede8d..de17e5608 100644 --- a/src/wallet/api/wallet.cpp +++ b/src/wallet/api/wallet.cpp @@ -44,6 +44,11 @@ #include #include +#ifdef WIN32 +#include +#include +#endif + using namespace std; using namespace cryptonote; @@ -291,6 +296,11 @@ uint64_t Wallet::maximumAllowedAmount() } void Wallet::init(const char *argv0, const char *default_log_base_name) { +#ifdef WIN32 + // Activate UTF-8 support for Boost filesystem classes on Windows + std::locale::global(boost::locale::generator().generate("")); + boost::filesystem::path::imbue(std::locale()); +#endif epee::string_tools::set_module_name_and_folder(argv0); mlog_configure(mlog_get_default_log_path(default_log_base_name), true); } -- cgit v1.2.3