src/CFPropertyList/CFBinaryPropertyList.php
public static function convertCharset($string, $fromCharset, $toCharset = 'UTF-8')
    {
        if (function_exists('mb_convert_encoding')) {
            return mb_convert_encoding($string, $toCharset, $fromCharset);
        }
        if (function_exists('iconv')) {
            return iconv($fromCharset, $toCharset, $string);
        }
        if (function_exists('recode_string')) {
            return recode_string($fromCharset .'..'. $toCharset, $string);
        }

        throw new PListException('neither iconv nor mbstring supported. how are we supposed to work on strings here?');
    }
public static function convertCharset($string, $fromCharset, $toCharset = 'UTF-8')
    {
        if (function_exists('mb_convert_encoding')) {
            return mb_convert_encoding($string, $toCharset, $fromCharset);
        }
        if (function_exists('iconv')) {
            return iconv($fromCharset, $toCharset, $string);
        }
        if (function_exists('recode_string')) {
            return recode_string($fromCharset .'..'. $toCharset, $string);
        }

        throw new PListException('neither iconv nor mbstring supported. how are we supposed to work on strings here?');
    }
public static function convertCharset ( $ string , $ fromCharset , $ toCharset = 'UTF-8' ) { if ( function_exists ( 'mb_convert_encoding' ) ) { return mb_convert_encoding ( $ string , $ toCharset , $ fromCharset ) ; } if ( function_exists ( 'iconv' ) ) { return iconv ( $ fromCharset , $ toCharset , $ string ) ; } if ( function_exists ( 'recode_string' ) ) { return recode_string ( $ fromCharset . '..' . $ toCharset , $ string ) ; } throw new PListException ( 'neither iconv nor mbstring supported. how are we supposed to work on strings here?' ) ; }
Convert the given string from one charset to another.
Trying to use MBString, Iconv, Recode - in that particular order.
@param string $string the string to convert
@param string $fromCharset the charset the given string is currently encoded in
@param string $toCharset the charset to convert to, defaults to UTF-8
@return string the converted string
@throws PListException on neither MBString, Iconv, Recode being available
Convert the given string from one charset to another . Trying to use MBString Iconv Recode - in that particular order .