Feature/fix for utf8

Rebased version of #4 which fixes the test added by #20 

Closes #4