Encode passwords UTF-8 before attempting to hash them.

This ensures that non-ASCII passwords won't break stuff (yay)