Fix BOM and last line ending
Fix encoding