fix encoding for getting files