Convert hashes to utf8 if possible