You are here

public static function MbString::getSupportedEncodings in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/zendframework/zend-stdlib/src/StringWrapper/MbString.php \Zend\Stdlib\StringWrapper\MbString::getSupportedEncodings()

Get a list of supported character encodings

Return value

string[]

Overrides StringWrapperInterface::getSupportedEncodings

File

vendor/zendframework/zend-stdlib/src/StringWrapper/MbString.php, line 29

Class

MbString

Namespace

Zend\Stdlib\StringWrapper

Code

public static function getSupportedEncodings() {
  if (static::$encodings === null) {
    static::$encodings = array_map('strtoupper', mb_list_encodings());

    // FIXME: Converting € (UTF-8) to ISO-8859-16 gives a wrong result
    $indexIso885916 = array_search('ISO-8859-16', static::$encodings, true);
    if ($indexIso885916 !== false) {
      unset(static::$encodings[$indexIso885916]);
    }
  }
  return static::$encodings;
}