diff options
author | andi <andi@splitbrain.org> | 2005-01-25 19:48:55 +0100 |
---|---|---|
committer | andi <andi@splitbrain.org> | 2005-01-25 19:48:55 +0100 |
commit | 0c59b0cf929e1226a31e238856ee99b0889aeaf3 (patch) | |
tree | f71adbea4bf894dc0cc85f8449a10fd936793125 /inc/common.php | |
parent | 98f1fd231d98f1645ecc4f3e99bae609428b90fb (diff) | |
download | rpg-0c59b0cf929e1226a31e238856ee99b0889aeaf3.tar.gz rpg-0c59b0cf929e1226a31e238856ee99b0889aeaf3.tar.bz2 |
more deaccenting
darcs-hash:20050125184855-9977f-bcb8c1e22c8814d1d9b2c65a5673dae5ef7d86e4.gz
Diffstat (limited to 'inc/common.php')
-rw-r--r-- | inc/common.php | 24 |
1 files changed, 1 insertions, 23 deletions
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); |