diff --git a/src/lms/main.cpp b/src/lms/main.cpp index 185fc208..4cb86c98 100644 --- a/src/lms/main.cpp +++ b/src/lms/main.cpp @@ -207,6 +207,12 @@ int main(int argc, char* argv[]) Service config {createConfig(configFilePath)}; Service logger {std::make_unique()}; + // use system locale. libarchive relies on this to write filenames + if (char *locale {::setlocale(LC_ALL, "")}) + LMS_LOG(MAIN, INFO) << "locale set to '" << locale << "'"; + else + LMS_LOG(MAIN, WARNING) << "Cannot set locale from system"; + // Make sure the working directory exists std::filesystem::create_directories(config->getPath("working-dir")); std::filesystem::create_directories(config->getPath("working-dir") / "cache");