diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2012-06-11 16:26:21 +0200 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2012-06-11 16:26:21 +0200 |
commit | 739589f4853fa1c7caab15150fa8d4a98fe94663 (patch) | |
tree | 64c8344d1dc5542fd1a15b73b10b1bbfb8893839 | |
parent | 4f6978c30f5e64c4194ebe46c8c78d8ef1c002fd (diff) | |
download | nextcloud-server-739589f4853fa1c7caab15150fa8d4a98fe94663.tar.gz nextcloud-server-739589f4853fa1c7caab15150fa8d4a98fe94663.zip |
make sure that contact data are always utf8 encoded to avoid encoding problems
-rw-r--r-- | apps/contacts/import.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/contacts/import.php b/apps/contacts/import.php index 0ee35f9fd81..232de8233a9 100644 --- a/apps/contacts/import.php +++ b/apps/contacts/import.php @@ -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 |