Encoding conversion moved to OC_Contacts_VCard::decodeProperty in commit 95cc9730aa49963a69e46154b0cba19232219d2e

This commit is contained in:
Thomas Tanghus 2012-06-11 22:05:15 +02:00
parent 8af53829d5
commit c75f9f9397

View file

@ -63,13 +63,13 @@ foreach($lines as $line){
if(strtoupper(trim($line)) == 'BEGIN:VCARD'){ if(strtoupper(trim($line)) == 'BEGIN:VCARD'){
$inelement = true; $inelement = true;
} elseif (strtoupper(trim($line)) == 'END:VCARD') { } elseif (strtoupper(trim($line)) == 'END:VCARD') {
$card[] = str_replace('=0D=0A', '\n', iconv(mb_detect_encoding($line, 'UTF-8, ISO-8859-1'), 'utf-8', $line)); $card[] = $line;
$parts[] = implode($nl, $card); $parts[] = implode($nl, $card);
$card = array(); $card = array();
$inelement = false; $inelement = false;
} }
if ($inelement === true && trim($line) != '') { if ($inelement === true && trim($line) != '') {
$card[] = str_replace('=0D=0A', '\n', iconv(mb_detect_encoding($line, 'UTF-8, ISO-8859-1'), 'utf-8', $line)); $card[] = $line;
} }
} }
//import the contacts //import the contacts