correct the compile error, and change the encoding and EOF