diff --git a/lib/ApplicationFeatures/LanguageFeature.cpp b/lib/ApplicationFeatures/LanguageFeature.cpp index 7bd58f4901..b2bf0e9fa7 100644 --- a/lib/ApplicationFeatures/LanguageFeature.cpp +++ b/lib/ApplicationFeatures/LanguageFeature.cpp @@ -100,7 +100,11 @@ void* LanguageFeature::prepareIcu(std::string const& binaryPath, std::string con std::string icu_path = path.substr(0, path.length() - fn.length()); FileUtils::makePathAbsolute(icu_path); FileUtils::normalizePath(icu_path); +#ifndef _WIN32 setenv("ICU_DATA", icu_path.c_str(), 1); +#else + SetEnvironmentVariable("ICU_DATA", icu_path.c_str()); +#endif } }