Handle files with messed up encoding