1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2025-02-07 01:54:16 +01:00

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 1ee05e12bd
commit ba91bf5bae

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