Fix parsing of utf8 files with non-ascii chars

@maxfliri