From a45693a86a683f98f40b5c7a0993f51b872a14d0 Mon Sep 17 00:00:00 2001 From: Nikolay Bogoychev Date: Sun, 3 Mar 2019 10:11:53 +0000 Subject: [PATCH] Windows requires explicit u8string in order to support utf8 characters --- file_utilities.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/file_utilities.h b/file_utilities.h index 6f68634..573aac0 100644 --- a/file_utilities.h +++ b/file_utilities.h @@ -43,7 +43,7 @@ class fileCopier { void copy(std::string& path) { fs::path filepath(path); - fs::path hypofile = fs::path(savedir.string() + std::string("/") + filepath.filename().string()); + fs::path hypofile = fs::path(savedir.u8string() + std::string("/") + filepath.filename().u8string()); if (!fs::exists(hypofile)) { fs::copy(filepath, savedir); } @@ -51,7 +51,7 @@ class fileCopier { void uncopy(std::string& path) { fs::path origfile(path); - fs::path hypofile = fs::path(savedir.string() + std::string("/") + origfile.filename().string()); + fs::path hypofile = fs::path(savedir.u8string() + std::string("/") + origfile.filename().u8string()); if (fs::exists(hypofile)) { fs::remove(hypofile); }