iconv_fallback_int_utf8 example

public static function iconv_fallback_iso88591_utf8($string$bom=false) {
        if (function_exists('utf8_encode')) {
            return utf8_encode($string);
        }
        // utf8_encode() unavailable, use getID3()'s iconv_fallback() conversions (possibly PHP is compiled without XML support)         $newcharstring = '';
        if ($bom) {
            $newcharstring .= "\xEF\xBB\xBF";
        }
        for ($i = 0; $i < strlen($string)$i++) {
            $charval = ord($string[$i]);
            $newcharstring .= self::iconv_fallback_int_utf8($charval);
        }
        return $newcharstring;
    }

    /** * ISO-8859-1 => UTF-16BE * * @param string $string * @param bool $bom * * @return string */
Home | Imprint | This part of the site doesn't use cookies.