From cfa5daec8f3799fe249afa98ea2bd82b596ffffe Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Fri, 7 Apr 2017 16:43:26 +0200 Subject: [PATCH] port setenv call for windows --- lib/ApplicationFeatures/LanguageFeature.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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 } }