Merge pull request #7 from filkaris/utf8_bug

Fix multibyte bug on utf-8 import
This commit is contained in:
Ralf Becker 2017-02-28 14:05:23 +01:00 committed by GitHub
commit cac41f297e

View File

@ -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'];