Question and answer is powered by AnsPress.io
Simple solution – also add $this->
to the inner utf8ize
call
public function file($d) { if (is_array($d)) { foreach ($d as $k => $v) { $d[$k] = $this->file($v); } } else if (is_string ($d)) { $d = iconv('UTF-8', 'ISO-8859-1', $d); return utf8_encode($d); } return $d; }