mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-24 17:04:14 +01:00
Use new translation::detect_encoding() for encoding detection
This commit is contained in:
parent
99e1cad866
commit
084a5a5b93
@ -62,7 +62,7 @@
|
||||
// Check file encoding matches import
|
||||
$sample = file_get_contents($content['file']['tmp_name'],false, null, 0, 1024);
|
||||
$required = $options['charset'] == 'user' || !$options['charset'] ? $GLOBALS['egw_info']['user']['preferences']['common']['csv_charset'] : $options['charset'];
|
||||
$encoding = mb_detect_encoding($sample,$required,true);
|
||||
$encoding = translation::detect_encoding($sample);
|
||||
if($encoding && strtoupper($required) != strtoupper($encoding))
|
||||
{
|
||||
$this->message = lang("Encoding mismatch. Expected %1 file, you uploaded %2.<br />\n",
|
||||
|
Loading…
Reference in New Issue
Block a user