/** * Utf8ize a string or array * http://stackoverflow.com/questions/10199017/how-to-solve-json-error-utf8-error-in-php-json-decode * @param mixed $mixed The item to uft8ize * @return mixed The utf8ized item */ public static function utf8ize($mixed) { if (is_array($mixed)) { foreach ($mixed as $key => $value) { $mixed[$key] = Kit::utf8ize($value); } } else { if (is_string($mixed)) { return utf8_encode($mixed); } } return $mixed; }