From 2aef7a31d6324f85482124aba1d1efc86f64ce30 Mon Sep 17 00:00:00 2001 From: Jordi Sanfeliu Date: Wed, 5 Jul 2017 11:47:16 +0200 Subject: [PATCH] small fix. #186 --- Changes | 2 ++ lib/port.pm | 1 + 2 files changed, 3 insertions(+) diff --git a/Changes b/Changes index 809380e..291c2fb 100644 --- a/Changes +++ b/Changes @@ -27,6 +27,8 @@ - Added more precision to the values in 'gensens.pm. - Added string encoding to avoid the message 'Wide character in print at ./monitorix.cgi line ...'. [#186] +- Added to force a standard locale in 'port.pm'. in order to be able for + Monitorix to read the output of system commands (netstat, ...). [#186] - Fixed an undeclared global symbol "$imgfmt_lc" in 'traffacct.pm'. - Fixed the MIME type of graphs in 'emailreports.pm' and in 'traffacct.pm' to honor the 'image_format' option. [#174] diff --git a/lib/port.pm b/lib/port.pm index 91d787b..73e7578 100644 --- a/lib/port.pm +++ b/lib/port.pm @@ -29,6 +29,7 @@ use Exporter 'import'; our @EXPORT = qw(port_init port_update port_cgi); # Force a standard locale +$ENV{LANG} = ""; setlocale(LC_ALL, "C"); sub port_init {