protected function normalizeEncoding($encoding)
    {
        if ($encoding === null) {
            $encoding = '';
        }

        if ($encoding === '') {
            return $encoding;
        }

        return '.'.strtolower(str_replace('-', '', $encoding));
    }
protected function normalizeEncoding($encoding)
    {
        if ($encoding === null) {
            $encoding = '';
        }

        if ($encoding === '') {
            return $encoding;
        }

        return '.'.strtolower(str_replace('-', '', $encoding));
    }
protected function normalizeEncoding ( $ encoding ) { if ( $ encoding === null ) { $ encoding = '' ; } if ( $ encoding === '' ) { return $ encoding ; } return '.' . strtolower ( str_replace ( '-' , '' , $ encoding ) ) ; }
Returns a normalized encoding.

@example Will convert an encoding string like "UTF-8" to ".utf8" OR "ISO-8859-1" to ".iso88591" so the locales
can be set correctly.

@param string $encoding The encoding to be normalized

@author Benjamin Carl <opensource@clickalicious.de>

@return string The normalized encoding
Returns a normalized encoding .