diff --git a/gulliver/system/class.g.php b/gulliver/system/class.g.php index b70a5d488..147b03aa8 100644 --- a/gulliver/system/class.g.php +++ b/gulliver/system/class.g.php @@ -2970,11 +2970,10 @@ class G */ public function is_utf8 ($string) { - if (is_array( $string )) { - $enc = implode( '', $string ); - return @! ((ord( $enc[0] ) != 239) && (ord( $enc[1] ) != 187) && (ord( $enc[2] ) != 191)); + if (preg_match('//u', $string)) { + return true; } else { - return (utf8_encode( utf8_decode( $string ) ) == $string); + return false; } } diff --git a/workflow/engine/controllers/pmTablesProxy.php b/workflow/engine/controllers/pmTablesProxy.php index 2f92242a9..3db3891ae 100644 --- a/workflow/engine/controllers/pmTablesProxy.php +++ b/workflow/engine/controllers/pmTablesProxy.php @@ -506,7 +506,12 @@ class pmTablesProxy extends HttpProxyController $j = 0; foreach ($aAdditionalTables['FIELDS'] as $aField) { $conData++; - $temp = (array_key_exists($j, $aAux))? '"' . addslashes(stripslashes(utf8_encode($aAux[$j]))) . '"' : '""'; + + if (array_key_exists($j, $aAux)) { + $temp = '"' . addslashes(stripslashes(G::is_utf8($aAux[$j]) ? $aAux[$j] : utf8_encode($aAux[$j]))) . '"'; + } else { + $temp = '""'; + } if ($temp == '') { switch ($aField['FLD_TYPE']) {