]> source.dussan.org Git - nextcloud-server.git/commitdiff
Contacts: Fix encoding errors, import errors, developer headache, paint cute kittens...
authorThomas Tanghus <thomas@tanghus.net>
Mon, 11 Jun 2012 20:00:06 +0000 (22:00 +0200)
committerThomas Tanghus <thomas@tanghus.net>
Mon, 11 Jun 2012 20:15:31 +0000 (22:15 +0200)
apps/contacts/lib/vcard.php

index 20a9e4afc9c2c199872aeadaf6b0df4193d89f26..168e8af3e55d5328f4a486581d82d4d970f8eb52 100644 (file)
@@ -131,7 +131,7 @@ class OC_Contacts_VCard{
                foreach($property->parameters as $key=>&$parameter){
                        if(strtoupper($parameter->name) == 'ENCODING') {
                                if(strtoupper($parameter->value) == 'QUOTED-PRINTABLE') { // what kind of other encodings could be used?
-                                       $property->value = quoted_printable_decode($property->value);
+                                       $property->value = str_replace("\r\n", "\n", mb_convert_encoding(quoted_printable_decode($property->value), 'utf-8', 'auto'));
                                        unset($property->parameters[$key]);
                                }
                        } elseif(strtoupper($parameter->name) == 'CHARSET') {