389,7 → 389,7 |
foreach ($cols as $col => $order) { |
$colarr[$col] = array(); |
foreach ($array as $k => $row) { |
$colarr[$col]['_'.$k] = strtolower($row[$col]); |
$colarr[$col]['_'.$k] = strtolower(self::supprimerAccents($row[$col], encodage_appli)); |
} |
} |
$params = array(); |
416,5 → 416,16 |
} |
return $ret; |
} |
|
private static function supprimerAccents($str, $charset='utf-8') |
{ |
$str = htmlentities($str, ENT_NOQUOTES, $charset); |
|
$str = preg_replace('#&([A-za-z])(?:acute|cedil|circ|grave|orn|ring|slash|th|tilde|uml);#', '\1', $str); |
$str = preg_replace('#&([A-za-z]{2})(?:lig);#', '\1', $str); // pour les ligatures e.g. 'œ' |
$str = preg_replace('#&[^;]+;#', '', $str); // supprime les autres caractères |
|
return $str; |
} |
} |
?> |