Encode text for hash as UTF-8 instead of Latin-1.