diff options
-rw-r--r-- | inc/common.php | 24 | ||||
-rw-r--r-- | inc/utf8.php | 8 |
2 files changed, 3 insertions, 29 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); diff --git a/inc/utf8.php b/inc/utf8.php index 80b85637b..1d2676688 100644 --- a/inc/utf8.php +++ b/inc/utf8.php @@ -322,8 +322,6 @@ $UTF8_UPPER_TO_LOWER = @array_flip($UTF8_LOWER_TO_UPPER); * This lookuptable defines replacements for accented characters from the ASCII-7 * range. This are lower case letters only. * - * FIXME missing chars eg: æ - * * @author Andreas Gohr <andi@splitbrain.org> * @see utf8_deaccent() */ @@ -342,7 +340,7 @@ $UTF8_LOWER_ACCENTS = array( 'ÿ' => 'y', 'ũ' => 'u', 'ŭ' => 'u', 'ư' => 'u', 'ţ' => 't', 'ý' => 'y', 'ő' => 'o', 'â' => 'a', 'ľ' => 'l', 'ẅ' => 'w', 'ż' => 'z', 'ī' => 'i', 'ã' => 'a', 'ġ' => 'g', 'ṁ' => 'm', 'ō' => 'o', 'ĩ' => 'i', 'ù' => 'u', 'į' => 'i', 'ź' => 'z', 'á' => 'a', - 'û' => 'u', + 'û' => 'u', 'þ' => 'th', 'ð' => 'dh', 'æ' => 'ae', 'µ' => 'u', ); /** @@ -351,8 +349,6 @@ $UTF8_LOWER_ACCENTS = array( * This lookuptable defines replacements for accented characters from the ASCII-7 * range. This are upper case letters only. * - * FIXME missing chars eg: æ - * * @author Andreas Gohr <andi@splitbrain.org> * @see utf8_deaccent() */ @@ -371,7 +367,7 @@ $UTF8_UPPER_ACCENTS = array( 'ÿ' => 'Y', 'ũ' => 'U', 'ŭ' => 'U', 'ư' => 'U', 'ţ' => 'T', 'ý' => 'Y', 'ő' => 'O', 'â' => 'A', 'ľ' => 'L', 'ẅ' => 'W', 'ż' => 'Z', 'ī' => 'I', 'ã' => 'A', 'ġ' => 'G', 'ṁ' => 'M', 'ō' => 'O', 'ĩ' => 'I', 'ù' => 'U', 'į' => 'I', 'ź' => 'Z', 'á' => 'A', - 'û' => 'U', + 'û' => 'U', 'Þ' => 'th', 'Ð' => 'dh', 'Æ' => 'ae', ); ?> |