make sure that contact data are always utf8 encoded to avoid encoding problems
This commit is contained in:
parent
4f6978c30f
commit
739589f485
1 changed files with 2 additions and 2 deletions
|
@ -63,13 +63,13 @@ foreach($lines as $line){
|
|||
if(strtoupper(trim($line)) == 'BEGIN:VCARD'){
|
||||
$inelement = true;
|
||||
} elseif (strtoupper(trim($line)) == 'END:VCARD') {
|
||||
$card[] = $line;
|
||||
$card[] = iconv(mb_detect_encoding($line, 'UTF-8, ISO-8859-1'), 'utf-8', $line);
|
||||
$parts[] = implode($nl, $card);
|
||||
$card = array();
|
||||
$inelement = false;
|
||||
}
|
||||
if ($inelement === true && trim($line) != '') {
|
||||
$card[] = $line;
|
||||
$card[] = iconv(mb_detect_encoding($line, 'UTF-8, ISO-8859-1'), 'utf-8', $line);
|
||||
}
|
||||
}
|
||||
//import the contacts
|
||||
|
|
Loading…
Reference in a new issue