SwatI18N/SwatI18NLocale.php
private function iconvArray($from, $to, array $array)
    {
        if ($from != $to) {
            foreach ($array as $key => $value) {
                if (is_array($value)) {
                    $array[$key] = $this->iconvArray($from, $to, $value);
                } elseif (is_string($value)) {
                    $output = iconv($from, $to, $value);
                    if ($output === false) {
                        throw new SwatException(
                            sprintf(
                                'Could not convert %s output to %s',
                                $from,
                                $to
                            )
                        );
                    }

                    $array[$key] = $output;
                }
            }
        }

        return $array;
    }
private function iconvArray($from, $to, array $array)
    {
        if ($from != $to) {
            foreach ($array as $key => $value) {
                if (is_array($value)) {
                    $array[$key] = $this->iconvArray($from, $to, $value);
                } elseif (is_string($value)) {
                    $output = iconv($from, $to, $value);
                    if ($output === false) {
                        throw new SwatException(
                            sprintf(
                                'Could not convert %s output to %s',
                                $from,
                                $to
                            )
                        );
                    }

                    $array[$key] = $output;
                }
            }
        }

        return $array;
    }
private function iconvArray ( $ from , $ to , array $ array ) { if ( $ from != $ to ) { foreach ( $ array as $ key => $ value ) { if ( is_array ( $ value ) ) { $ array [ $ key ] = $ this -> iconvArray ( $ from , $ to , $ value ) ; } elseif ( is_string ( $ value ) ) { $ output = iconv ( $ from , $ to , $ value ) ; if ( $ output === false ) { throw new SwatException ( sprintf ( 'Could not convert %s output to %s' , $ from , $ to ) ) ; } $ array [ $ key ] = $ output ; } } } return $ array ; }
Recursivly converts the character encoding of all strings in an array

@param string $from the character encoding to convert from.
@param string $to the character encoding to convert to.
@param array $array the array to convert.

@return array a new array with all strings converted to the given
character encoding.

@throws SwatException if any component of the array can not be converted
from the <i>$from</i> character encoding to the
<i>$to</i> character encoding.
Recursivly converts the character encoding of all strings in an array