fix reading file encoding bug #20