diff --git a/htdocs/imports/import.php b/htdocs/imports/import.php index e6ab032ca63..b4bef1ecc5f 100644 --- a/htdocs/imports/import.php +++ b/htdocs/imports/import.php @@ -547,8 +547,7 @@ if ($step == 3 && $datatoimport) // Search available imports $dir = $conf->import->dir_temp; - $newdir=utf8_check($dir)?utf8_decode($dir):$dir; // opendir need ISO - $handle=@opendir($newdir); + $handle=@opendir(dol_osencode($dir)); if (is_resource($handle)) { //print ''; @@ -1400,14 +1399,14 @@ if ($step == 5 && $datatoimport) { //print ''.$langs->trans("RunSimulateImportFile").''; - print ''.$langs->trans("RunImportFile").''; + print ''.$langs->trans("RunImportFile").''; } } else { - print ''.$langs->trans("RunSimulateImportFile").''; + print ''.$langs->trans("RunSimulateImportFile").''; - print ''.$langs->trans("RunImportFile").''; + print ''.$langs->trans("RunImportFile").''; } print ''; } diff --git a/htdocs/includes/modules/import/import_csv.modules.php b/htdocs/includes/modules/import/import_csv.modules.php index 43ee7c98262..691c6412612 100644 --- a/htdocs/includes/modules/import/import_csv.modules.php +++ b/htdocs/includes/modules/import/import_csv.modules.php @@ -167,8 +167,7 @@ class ImportCsv extends ModeleImports ini_set('auto_detect_line_endings',1); // For MAC compatibility - $newfile=utf8_check($file)?utf8_decode($file):$file; // fopen need ISO file name - $this->handle = fopen($newfile, "r"); + $this->handle = fopen(dol_osencode($file), "r"); if (! $this->handle) { $langs->load("errors");