src/FACTFinder/Core/AbstractEncodingConverter.php
protected function convert_recursive($inCharset, $outCharset, $data)
    {
        if (FF::isInstanceOf($data, 'Util\Parameters'))
        {
            $result = FF::getInstance(
                'Util\Parameters',
                $this->convert($inCharset, $outCharset, $data->getArray())
            );
        }
        else if (is_array($data))
        {
            $result = array();
            foreach ($data as $k => $v)
            {
                $k = $this->convert_recursive($inCharset, $outCharset, $k);
                $result[$k] = $this->convert_recursive($inCharset, $outCharset, $v);
            }
        }
        else if (is_string($data))
        {
            $result = $this->convertString($inCharset, $outCharset, $data);
        }
        else
        {
            $result = $data;
        }

        return $result;
    }
protected function convert_recursive($inCharset, $outCharset, $data)
    {
        if (FF::isInstanceOf($data, 'Util\Parameters'))
        {
            $result = FF::getInstance(
                'Util\Parameters',
                $this->convert($inCharset, $outCharset, $data->getArray())
            );
        }
        else if (is_array($data))
        {
            $result = array();
            foreach ($data as $k => $v)
            {
                $k = $this->convert_recursive($inCharset, $outCharset, $k);
                $result[$k] = $this->convert_recursive($inCharset, $outCharset, $v);
            }
        }
        else if (is_string($data))
        {
            $result = $this->convertString($inCharset, $outCharset, $data);
        }
        else
        {
            $result = $data;
        }

        return $result;
    }
Converts data from $inCharset to $outCharset.
@param mixed $data If a string is given, it's encoding will be converted.
If an associative array is given, keys and values will be
converted recursively. All other data types will be returned
unchanged.
@return mixed