Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Mbstring.php

function Mbstring::mb_internal_encoding

4 calls to Mbstring::mb_internal_encoding()
Mbstring::mb_internal_trim in vendor/symfony/polyfill-mbstring/Mbstring.php
Mbstring::mb_lcfirst in vendor/symfony/polyfill-mbstring/Mbstring.php
Mbstring::mb_str_pad in vendor/symfony/polyfill-mbstring/Mbstring.php
Mbstring::mb_ucfirst in vendor/symfony/polyfill-mbstring/Mbstring.php

File

vendor/symfony/polyfill-mbstring/Mbstring.php, line 367

Class

Mbstring
Partial mbstring implementation in PHP, iconv based, UTF-8 centric.

Namespace

Symfony\Polyfill\Mbstring

Code

public static function mb_internal_encoding($encoding = null) {
    if (null === $encoding) {
        return self::$internalEncoding;
    }
    $normalizedEncoding = self::getEncoding($encoding);
    if ('UTF-8' === $normalizedEncoding || false !== @iconv($normalizedEncoding, $normalizedEncoding, ' ')) {
        self::$internalEncoding = $normalizedEncoding;
        return true;
    }
    if (80000 > \PHP_VERSION_ID) {
        return false;
    }
    throw new \ValueError(sprintf('Argument #1 ($encoding) must be a valid encoding, "%s" given', $encoding));
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal