Fixed encode unicode string to utf-8 before hashing