public static function encode($encodingLabel, $text)
    {
        $encodingLabel = self::normalizeEncoding($encodingLabel);
        if ($encodingLabel == 'ISO-8859-1')
            return self::toWin1252($text);
        return self::toUTF8($text);
    }
public static function encode($encodingLabel, $text)
    {
        $encodingLabel = self::normalizeEncoding($encodingLabel);
        if ($encodingLabel == 'ISO-8859-1')
            return self::toWin1252($text);
        return self::toUTF8($text);
    }
public static function encode ( $ encodingLabel , $ text ) { $ encodingLabel = self :: normalizeEncoding ( $ encodingLabel ) ; if ( $ encodingLabel == 'ISO-8859-1' ) return self :: toWin1252 ( $ text ) ; return self :: toUTF8 ( $ text ) ; }
Convert the text to either UTF-8 or ISO-85591-1.

@param $encodingLabel Can be UTF-8 or ISO-8859-1
@return string The encoded text
Convert the text to either UTF - 8 or ISO - 85591 - 1 .