Merge branch 'fix/win32-set-names' into 'develop'

Fix encoding related issues.

See merge request artica/pandorafms!2009
This commit is contained in:
nramon 2018-11-22 12:34:24 +01:00
commit 3586403a08
2 changed files with 2 additions and 1 deletions

View File

@ -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;
}

View File

@ -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`;