Encode and decode the strings in files properly
Change the reading method of generated output in tests - part 2
Use read in test, not readfp
Simplify the printing of the errors