private function encodeUTF8($object)
    {
        if (\is_array($object)) {
            return array_map([$this, 'encodeUTF8'], $object);
        }

        return mb_convert_encoding((string) $object, 'UTF-8', 'auto');
    }
private function encodeUTF8($object)
    {
        if (\is_array($object)) {
            return array_map([$this, 'encodeUTF8'], $object);
        }

        return mb_convert_encoding((string) $object, 'UTF-8', 'auto');
    }
private function encodeUTF8 ( $ object ) { if ( \ is_array ( $ object ) ) { return array_map ( [ $ this , 'encodeUTF8' ] , $ object ) ; } return mb_convert_encoding ( ( string ) $ object , 'UTF-8' , 'auto' ) ; }
Converts any string or array of strings to UTF8.

@param mixed|mixed[] $object a String or an array

@return mixed|mixed[] UTF8-string or array
Converts any string or array of strings to UTF8 .