fixing unicode handling, fixes #26

@ivolo @gjohnson