function Unicode::getStatus

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Component/Utility/Unicode.php \Drupal\Component\Utility\Unicode::getStatus()
  2. 10 core/lib/Drupal/Component/Utility/Unicode.php \Drupal\Component\Utility\Unicode::getStatus()
  3. 9 core/lib/Drupal/Component/Utility/Unicode.php \Drupal\Component\Utility\Unicode::getStatus()
  4. 8.9.x core/lib/Drupal/Component/Utility/Unicode.php \Drupal\Component\Utility\Unicode::getStatus()

Gets the current status of unicode/multibyte support on this environment.

Return value

int The status of multibyte support. It can be one of:

2 calls to Unicode::getStatus()
SystemRequirements::checkRequirements in core/modules/system/src/Install/Requirements/SystemRequirements.php
Check requirements for a given phase.
SystemRequirementsHooks::checkRequirements in core/modules/system/src/Hook/SystemRequirementsHooks.php
Check requirements for a given phase.

File

core/lib/Drupal/Component/Utility/Unicode.php, line 102

Class

Unicode
Provides Unicode-related conversions and operations.

Namespace

Drupal\Component\Utility

Code

public static function getStatus() {
  switch (static::check()) {
    case 'mb_strlen':
      return Unicode::STATUS_SINGLEBYTE;
    case '':
      return Unicode::STATUS_MULTIBYTE;
  }
  return Unicode::STATUS_ERROR;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.