protected static function normalizeEncoding($encodingLabel)
    {
        $encoding = strtoupper($encodingLabel);
        $encoding = preg_replace('/[^a-zA-Z0-9\s]/', '', $encoding);

        $equivalences = [
            'ISO88591'      => 'ISO-8859-1',
            'ISO8859'       => 'ISO-8859-1',
            'ISO'           => 'ISO-8859-1',
            'LATIN1'        => 'ISO-8859-1',
            'LATIN'         => 'ISO-8859-1',
            'UTF8'          => 'UTF-8',
            'UTF'           => 'UTF-8',
            'WIN1252'       => 'ISO-8859-1',
            'WINDOWS1252'   => 'ISO-8859-1'
        ];

        if (empty($equivalences[$encoding])) {
            return 'UTF-8';
        }

        return $equivalences[$encoding];
    }