correcting the encoding problem from the files