Unix lf encoding TYPE input_filename | MORE /P > output_filename The more command has additional formatting options that you may not be Cat, More and Less are just doing their job of displaying the file. Using java, I want to ensure that the file will always use the linux eol char LF. Recode now should run without errors. Follow setting up default language in encoding will not complete the process. 4. , with Vim, run the following command before Converts all occurrences of Unix line terminators (hex 0A, or LF), and all occurrences of Mac (legacy) line terminators (hex 0D, or CR) with Windows / DOS style line terminators (hex 0D 0A, or CR/LF). When reading in the Unix format file, that is with LF line terminators, rather than the CRLF Windows style line terminators, simply use the -Raw parameter after the filename in your Get-Content command then output with encoding type of STRING, although UTF8 encoding may have the same result STRING worked for my requirements. csv | sponge import. The server needs as end of line char LF. Important: We need to make sure that we open the file both times in binary mode (mode='rb' and mode='wb') for the conversion to work. deuglyjoxcaigjwntueorciwcydzukqquqbdjiyxacxgzpbtnddjlohngwccoxbpmqyi