How about normalizing your password string first?
import unicodedata norm_password = unicodedata.normalize('NFKD', password)Edit: u2019 is a right apostrophe. Maybe you need a different one? See: https://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html i.e. "\u27"