diff --git a/admin/import_export_framework.pl b/admin/import_export_framework.pl index 2a95c45014..20729f2c67 100755 --- a/admin/import_export_framework.pl +++ b/admin/import_export_framework.pl @@ -54,8 +54,12 @@ if ($action eq 'export' && $input->request_method() eq 'GET') { my $strXml = ''; my $format = $input->param('type_export_' . $frameworkcode); ExportFramework($frameworkcode, \$strXml, $format); + if ($format eq 'csv') { # CSV file + + # Correctly set the encoding to output plain text in UTF-8 + binmode(STDOUT,':encoding(UTF-8)'); print $input->header(-type => 'application/vnd.ms-excel', -attachment => 'export_' . $frameworkcode . '.csv'); print $strXml; } elsif ($format eq 'excel') {