Better handling of utf-8
Fixes #13