From 0c59b0cf929e1226a31e238856ee99b0889aeaf3 Mon Sep 17 00:00:00 2001 From: andi Date: Tue, 25 Jan 2005 19:48:55 +0100 Subject: more deaccenting darcs-hash:20050125184855-9977f-bcb8c1e22c8814d1d9b2c65a5673dae5ef7d86e4.gz --- inc/common.php | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) (limited to 'inc/common.php') diff --git a/inc/common.php b/inc/common.php index d756b914d..7700a71c9 100644 --- a/inc/common.php +++ b/inc/common.php @@ -418,29 +418,7 @@ function cleanID($id){ if($conf['deaccent']) $id = utf8_deaccent($id,-1); //remove specials (only ascii specials are removed) - $id = preg_replace('#[ !"§$%&()\[\]{}\\?`\'\#~*+=,<>\|^°@µ¹²³¼½¬]#u','_',$id); - -/* DELETEME legacy code - if(!$conf['localnames']){ - if($lang['encoding'] == 'iso-8859-15'){ - // replace accented chars with unaccented ones - // this may look strange on your terminal - just don't touch - $id = strtr( - strtr($id, - 'ŠŽšžŸÀÁÂÃÅÇÈÉÊËÌÍÎÏÑÒÓÔÕØÙÚÛÝàáâãåçèéêëìíîïñòóôõøùúûýÿ', - 'szszyaaaaaceeeeiiiinooooouuuyaaaaaceeeeiiiinooooouuuyy'), - array('Þ' => 'th', 'þ' => 'th', 'Ð' => 'dh', 'ð' => 'dh', 'ß' => 'ss', - 'Œ' => 'oe', 'œ' => 'oe', 'Æ' => 'ae', 'æ' => 'ae', 'µ' => 'u', - 'ü' => 'ue', 'ö' => 'oe', 'ä' => 'ae', 'Ü' => 'ue', 'Ö' => 'ö', - 'Ä' => 'ae')); - } - $WORD = 'a-z'; - }else{ - $WORD = '\w'; - } - //special chars left will be converted to _ - $id = preg_replace('#[^'.$WORD.'0-9:\-\.]#','_',$id); -*/ + $id = preg_replace('#[0x00-0x20 !"§$%&()\[\]{}\\?`\'\#~*+=,<>\|^°@µ¹²³¼½¬]#u','_',$id); //clean up $id = preg_replace('#__#','_',$id); -- cgit v1.2.3