From 7ada579ae056537cd8fb87eaaedaabd84ec62689 Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Thu, 25 Oct 2018 11:22:24 +0200 Subject: [PATCH] Bug 15395: Do not use nl_putenv, use $ENV instead nl_putenv is only useful on Windows systems Signed-off-by: Jonathan Druart Signed-off-by: Nick Clemens --- Koha/I18N.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Koha/I18N.pm b/Koha/I18N.pm index 44c47132ff..2152654d5a 100644 --- a/Koha/I18N.pm +++ b/Koha/I18N.pm @@ -24,7 +24,7 @@ use C4::Languages; use C4::Context; use Encode; -use Locale::Messages qw(:locale_h nl_putenv setlocale LC_MESSAGES); +use Locale::Messages qw(:locale_h setlocale LC_MESSAGES); use Koha::Cache::Memory::Lite; use parent 'Exporter'; @@ -54,7 +54,7 @@ sub init { if (@system_locales) { # LANG needs to be set to a valid locale, # otherwise LANGUAGE is ignored - nl_putenv('LANG=' . $system_locales[0]); + $ENV{LANG} = $system_locales[0]; setlocale(LC_MESSAGES, ''); my $langtag = C4::Languages::getlanguage; @@ -68,8 +68,8 @@ sub init { $locale .= '_' . $region; } - nl_putenv("LANGUAGE=$locale"); - nl_putenv('OUTPUT_CHARSET=UTF-8'); + $ENV{LANGUAGE} = $locale; + $ENV{OUTPUT_CHARSET} = 'UTF-8'; my $directory = _base_directory(); textdomain($textdomain); -- 2.39.5