invalid encoding when exporting from windows