Added preliminary python3 support
Convert to utf-8 before hashing