mirror of
https://git.code.sf.net/p/seeddms/code
synced 2026-05-08 21:41:23 +00:00
do not call mb_convert_encoding() if encoding is unknown
This commit is contained in:
parent
e3b52ad744
commit
0663f79640
|
|
@ -57,7 +57,8 @@ class SeedDMS_ConversionServiceTextToText extends SeedDMS_ConversionServiceBase
|
|||
$encoding = $this->detect_utf_encoding($content);
|
||||
// mb_detect_encoding() is not a good as detect_utf_encoding()
|
||||
// $encoding = mb_detect_encoding($content);
|
||||
$content = mb_convert_encoding($content, 'utf8', $encoding);
|
||||
if ($encoding)
|
||||
$content = mb_convert_encoding($content, 'utf8', $encoding);
|
||||
if($target) {
|
||||
file_put_contents($target, $content);
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user