diff --git a/importexport/inc/class.importexport_import_ui.inc.php b/importexport/inc/class.importexport_import_ui.inc.php index 839bca30f8..f4462bfce0 100644 --- a/importexport/inc/class.importexport_import_ui.inc.php +++ b/importexport/inc/class.importexport_import_ui.inc.php @@ -74,7 +74,8 @@ use EGroupware\Api\Etemplate; $plugin = new $definition_obj->plugin; // Check file encoding matches import - $sample = file_get_contents($content['file']['tmp_name'],false, null, 0, 1024); + $sample = mb_substr(file_get_contents($content['file']['tmp_name'], false, null, 0, 2048), 1024); + if($appname == 'addressbook' && $definition_obj->plugin == 'addressbook_import_vcard') { $preference = $GLOBALS['egw_info']['user']['preferences']['addressbook']['vcard_charset'];