aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/api/wallet.cpp
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2018-03-05 19:15:54 +0200
committerRiccardo Spagni <ric@spagni.net>2018-03-05 19:15:54 +0200
commit237f0179b70eb795772e815f2e9ff6f056f53c22 (patch)
tree8e2e88d92272256b65652e41a5cf56881cb85f30 /src/wallet/api/wallet.cpp
parentMerge pull request #3343 (diff)
parentWallet2 + CLI wallet: UTF-8 support for filenames and paths under Windows (diff)
downloadmonero-237f0179b70eb795772e815f2e9ff6f056f53c22.tar.xz
Merge pull request #3313
43026822 Wallet2 + CLI wallet: UTF-8 support for filenames and paths under Windows (rbrunner7)
Diffstat (limited to 'src/wallet/api/wallet.cpp')
-rw-r--r--src/wallet/api/wallet.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp
index 335fbf903..ff0d2fdbd 100644
--- a/src/wallet/api/wallet.cpp
+++ b/src/wallet/api/wallet.cpp
@@ -45,6 +45,11 @@
#include <sstream>
#include <unordered_map>
+#ifdef WIN32
+#include <boost/locale.hpp>
+#include <boost/filesystem.hpp>
+#endif
+
using namespace std;
using namespace cryptonote;
@@ -292,6 +297,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);
}