Merge branch 'ent-3344-7304-procesado-de-XML-con-acentos' into 'develop'

added accent compatibility Dataserver

See merge request artica/pandorafms!2109

Former-commit-id: 7e7479c3d82aeb398fb0c76fe7df61d8522af2b3
This commit is contained in:
Alejandro Fraguas 2019-02-04 14:05:40 +01:00
commit 67ab08fc41
1 changed files with 5 additions and 0 deletions

View File

@ -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$/);