Skip to content
This repository has been archived by the owner on Jan 2, 2019. It is now read-only.

Fix: ConvertEncoding method try order #976

Open
wants to merge 1 commit into
base: 1.8
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Classes/PHPExcel/Shared/String.php
Original file line number Diff line number Diff line change
Expand Up @@ -486,14 +486,14 @@ public static function UTF8toBIFF8UnicodeLong($value)
*/
public static function ConvertEncoding($value, $to, $from)
{
if (self::getIsIconvEnabled()) {
return iconv($from, $to, $value);
}

if (self::getIsMbstringEnabled()) {
return mb_convert_encoding($value, $to, $from);
}

if (self::getIsIconvEnabled()) {
return iconv($from, $to, $value);
}

if ($from == 'UTF-16LE') {
return self::utf16_decode($value, false);
} elseif ($from == 'UTF-16BE') {
Expand Down