Suppression élément prepareString

This commit is contained in:
Michael RICOIS 2011-06-17 13:30:04 +00:00
parent df6e5946be
commit eb036cbd5a

View File

@ -127,18 +127,13 @@
}
function prepareString($str) {
$tabReplace=array();
for($c=0;$c<32; $c++)
$tabReplace[''.chr($c)]='';
for($c=127;$c<256; $c++)
$tabReplace[''.chr($c)]='';
return strtr(
strtr(htmlentities(utf8_decode(strtr(strtr($str, 'àáâãäåæçèéêëìíîïðñòóôõöùúûüýÿÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖÙÚÛÜݟ…‘‹',
"aaaaaaaceeeeiiiionooooouuuuyyAAAAAAACEEEEIIIIONOOOOOUUUUYY.''"), array('œ'=>'oe'))), ENT_QUOTES, 'ISO-8859-1'),array('€'=>'&euro;','’'=>'"')),
$tabReplace);
//return */
//return utf8_encode($str);
$tabReplace = array(
'œ' => "oe",
''.chr(160) => '',
);
return strtr($str,$tabReplace);
}