diff --git a/htdocs/imports/import.php b/htdocs/imports/import.php
index 97d4d8252d3..1116f27e9b2 100644
--- a/htdocs/imports/import.php
+++ b/htdocs/imports/import.php
@@ -548,8 +548,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 '
| ';
@@ -1399,14 +1398,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 5a3532c54ff..4378cd0c19e 100644
--- a/htdocs/includes/modules/import/import_csv.modules.php
+++ b/htdocs/includes/modules/import/import_csv.modules.php
@@ -169,8 +169,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");
|