diff --git a/pandora_server/lib/PandoraFMS/DataServer.pm b/pandora_server/lib/PandoraFMS/DataServer.pm index d0cc7e3ab9..43092c0f40 100644 --- a/pandora_server/lib/PandoraFMS/DataServer.pm +++ b/pandora_server/lib/PandoraFMS/DataServer.pm @@ -30,6 +30,10 @@ use XML::Simple; use POSIX qw(setsid strftime); use IO::Uncompress::Unzip; +# Required for file names with accents +use Encode qw(decode); +use Encode::Locale (); + # For Reverse Geocoding use LWP::Simple; @@ -111,6 +115,7 @@ sub data_producer ($) { # Do not read more than max_queue_files files my $file_count = 0; while (my $file = readdir (DIR)) { + $file = Encode::decode( locale_fs => $file ); # Data files must have the extension .data next if ($file !~ /^.*[\._]\d+\.data$/);