utf8 encode result array in order for json_encode not to fail at unencoded utf8 characters