diff options
| author | Chun Kuan Lee <[email protected]> | 2018-08-04 16:39:14 +0000 |
|---|---|---|
| committer | Chun Kuan Lee <[email protected]> | 2018-09-23 03:43:25 +0800 |
| commit | 2c3eade704f63b360926de9e975ce80143781679 (patch) | |
| tree | 8d7c217dff4350e9d42964b0f10800a4390b571d /src/util.cpp | |
| parent | Merge #14287: tests: Use MakeUnique to construct objects owned by unique_ptrs (diff) | |
| download | discoin-2c3eade704f63b360926de9e975ce80143781679.tar.xz discoin-2c3eade704f63b360926de9e975ce80143781679.zip | |
Make fs::path::string() always return utf-8 string
Diffstat (limited to 'src/util.cpp')
| -rw-r--r-- | src/util.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/util.cpp b/src/util.cpp index 75a387d7e..fa624aee9 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -1206,7 +1206,11 @@ void SetupEnvironment() // 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<wchar_t>())); +#endif } bool SetupNetworking() |