private function getNormalizedCharset($charset)
    {
        $upper = null;
        if (is_array($charset)) {
            $upper = array_map('strtoupper', $charset);
        } else {
            $upper = strtoupper($charset);
        }
        return preg_replace('/[^A-Z0-9]+/', '', $upper);
    }
private function getNormalizedCharset($charset)
    {
        $upper = null;
        if (is_array($charset)) {
            $upper = array_map('strtoupper', $charset);
        } else {
            $upper = strtoupper($charset);
        }
        return preg_replace('/[^A-Z0-9]+/', '', $upper);
    }
private function getNormalizedCharset ( $ charset ) { $ upper = null ; if ( is_array ( $ charset ) ) { $ upper = array_map ( 'strtoupper' , $ charset ) ; } else { $ upper = strtoupper ( $ charset ) ; } return preg_replace ( '/[^A-Z0-9]+/' , '' , $ upper ) ; }
The passed charset is uppercased, and stripped of non-alphanumeric
characters before being returned.

@param string|string[] $charset
@return string|string[]
The passed charset is uppercased and stripped of non - alphanumeric characters before being returned .