From 4fbe6f925e114da8dcd981208efd3c2ee12c2daf Mon Sep 17 00:00:00 2001 From: Victor Saisa Lopez Date: Fri, 16 Sep 2016 17:10:46 -0400 Subject: [PATCH] HOR-1892 "CLONE v3.1 - [Zendesk 3322] Valeo, csv not import correctly to a pmt table..." SOLVED Issue: CLONE v3.1 - [Zendesk 3322] Valeo, csv not import correctly to a pmt table if the csv has accents Cause: Algunos datos del file "csv" tienen una codificacion que no es UTF-8 Solution: Se codifican los datos del file "csv" a UTF-8 --- workflow/engine/controllers/pmTablesProxy.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/workflow/engine/controllers/pmTablesProxy.php b/workflow/engine/controllers/pmTablesProxy.php index 475f354be..1a1f5a521 100644 --- a/workflow/engine/controllers/pmTablesProxy.php +++ b/workflow/engine/controllers/pmTablesProxy.php @@ -506,7 +506,8 @@ class pmTablesProxy extends HttpProxyController $j = 0; foreach ($aAdditionalTables['FIELDS'] as $aField) { $conData++; - $temp = isset($aAux[$j]) ? '"'.addslashes(stripslashes($aAux[$j])).'"' : '""'; + $temp = (array_key_exists($j, $aAux))? '"' . addslashes(stripslashes(utf8_encode($aAux[$j]))) . '"' : '""'; + if ($temp == '') { switch ($aField['FLD_TYPE']) { case 'DATE': @@ -1691,4 +1692,3 @@ class pmTablesProxy extends HttpProxyController } } } -