fix encoding bug on windows