Encode unicode strings to ASCII when normalizing
Improve tests for invalid characters