diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index 109ae570ca..5209c75fe8 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -507,7 +507,7 @@ sub pandora_load_config { } # Collect items from config file and put in an array - if (! open (CFG, "< $archivo_cfg")) { + if (! open (CFG, "<:encoding(UTF-8)", $archivo_cfg)) { print "[ERROR] Error opening configuration file $archivo_cfg: $!.\n"; exit 1; } diff --git a/pandora_server/lib/PandoraFMS/Tools.pm b/pandora_server/lib/PandoraFMS/Tools.pm index 195443656f..848a2636d9 100755 --- a/pandora_server/lib/PandoraFMS/Tools.pm +++ b/pandora_server/lib/PandoraFMS/Tools.pm @@ -175,6 +175,7 @@ if ($OS eq 'linux') { } elsif ($OS =~ /win/i) { $OS = "windows"; $OS_VERSION = `ver`; + $OS_VERSION =~ s/[^[:ascii:]]//g; $DEVNULL = '/Nul'; } elsif ($OS eq 'freebsd') { $OS_VERSION = `uname -r`;