concrete/src/Database/Connection/Connection.php
public function getSupportedCharsets()
    {
        if ($this->supportedCharsets === null) {
            $supportedCharsets = [];
            $rs = $this->executeQuery('SHOW CHARACTER SET');
            while (($row = $rs->fetch(PDO::FETCH_ASSOC)) !== false) {
                if (!isset($row['Charset']) || !isset($row['Default collation'])) {
                    throw new Exception(t('Unrecognized result of the "%s" database query.', 'SHOW CHARACTER SET'));
                }
                $supportedCharsets[strtolower($row['Charset'])] = strtolower($row['Default collation']);
            }
            $this->supportedCharsets = $supportedCharsets;
        }

        return $this->supportedCharsets;
    }
public function getSupportedCharsets()
    {
        if ($this->supportedCharsets === null) {
            $supportedCharsets = [];
            $rs = $this->executeQuery('SHOW CHARACTER SET');
            while (($row = $rs->fetch(PDO::FETCH_ASSOC)) !== false) {
                if (!isset($row['Charset']) || !isset($row['Default collation'])) {
                    throw new Exception(t('Unrecognized result of the "%s" database query.', 'SHOW CHARACTER SET'));
                }
                $supportedCharsets[strtolower($row['Charset'])] = strtolower($row['Default collation']);
            }
            $this->supportedCharsets = $supportedCharsets;
        }

        return $this->supportedCharsets;
    }
public function getSupportedCharsets ( ) { if ( $ this -> supportedCharsets === null ) { $ supportedCharsets = [ ] ; $ rs = $ this -> executeQuery ( 'SHOW CHARACTER SET' ) ; while ( ( $ row = $ rs -> fetch ( PDO :: FETCH_ASSOC ) ) !== false ) { if ( ! isset ( $ row [ 'Charset' ] ) || ! isset ( $ row [ 'Default collation' ] ) ) { throw new Exception ( t ( 'Unrecognized result of the "%s" database query.' , 'SHOW CHARACTER SET' ) ) ; } $ supportedCharsets [ strtolower ( $ row [ 'Charset' ] ) ] = strtolower ( $ row [ 'Default collation' ] ) ; } $ this -> supportedCharsets = $ supportedCharsets ; } return $ this -> supportedCharsets ; }
Get the supported character sets and associated default collation.

@throws \Exception throws an exception in case of errors

@return array keys: character set (always lower case); array values: default collation for the character set (always lower case)
Get the supported character sets and associated default collation .