Skip to content

Commit

Permalink
Fix mb encoding list
Browse files Browse the repository at this point in the history
  • Loading branch information
zbateson committed Sep 28, 2018
1 parent abf7438 commit 723f25a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/MbWrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ public function __construct()
if (self::$mbListedEncodings === null) {
$cs = mb_list_encodings();
$keys = $this->getNormalizedCharset($cs);
self::$mbListedEncodings = array_combine($cs, $keys);
self::$mbListedEncodings = array_combine($keys, $cs);
}
}

Expand All @@ -318,7 +318,7 @@ private function getNormalizedCharset($charset)
} else {
$upper = strtoupper($charset);
}
return preg_replace('/[^A-Z0-9]+/', '', $charset);
return preg_replace('/[^A-Z0-9]+/', '', $upper);
}

/**
Expand Down

0 comments on commit 723f25a

Please sign in to comment.