thomascube
2011-04-13 e5e1eb0195d2501920fb46651a144747750fc913
Convert normalized latin-1 string back to utf8

1 files modified
4 ■■■■ changed files
program/include/rcube_addressbook.php 4 ●●●● patch | view | raw | blame | history
program/include/rcube_addressbook.php
@@ -405,10 +405,10 @@
        
        foreach ($arr as $i => $part) {
            if (utf8_encode(utf8_decode($part)) == $part) {  // is latin-1 ?
                $arr[$i] = strtr(strtolower(strtr(utf8_decode($part),
                $arr[$i] = utf8_encode(strtr(strtolower(strtr(utf8_decode($part),
                    'ÇçäâàåéêëèïîìÅÉöôòüûùÿøØáíóúñÑÁÂÀãÃÊËÈÍÎÏÓÔõÕÚÛÙýÝ',
                    'ccaaaaeeeeiiiaeooouuuyooaiounnaaaaaeeeiiioooouuuyy')),
                    array('ß' => 'ss', 'ae' => 'a', 'oe' => 'o', 'ue' => 'u'));
                    array('ß' => 'ss', 'ae' => 'a', 'oe' => 'o', 'ue' => 'u')));
            }
            else
                $arr[$i] = strtolower($part);