Fix non-unicode error messages

Ref #645
Merge branch 'non-unicode-errors' into develop