Finally fix issues with unicode vs ascii.
Thanks to KaiQ, DerKleineLeif, msoida, Unkuiri and everyone else who supplied
information on the issues and potential solutions.
Fixes #8. Fixes #16. Fixes #62.