Merge branch 'hotfix/locale' into release/0.10

This commit is contained in:
Sebastian Messmer 2019-02-28 22:02:31 -08:00
commit 14467453a4

View File

@ -266,8 +266,11 @@ void Fuse::_logUnknownException() {
}
void Fuse::run(const bf::path &mountdir, const vector<string> &fuseOptions) {
#if defined(__GLIBC__)|| defined(__APPLE__) || defined(_MSC_VER)
// Avoid encoding errors for non-utf8 characters, see https://github.com/cryfs/cryfs/issues/247
// this is ifdef'd out for non-glibc linux, because musl doesn't handle this correctly.
bf::path::imbue(std::locale(std::locale(), new std::codecvt_utf8_utf16<wchar_t>()));
#endif
_mountdir = mountdir;