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;
    }