Fix #88

Fix #88

Uses implicit codec to correct invalid characters in input files.