fix encoding and EOL