ceumicrodata / mETL

mito ETL tool
161 stars 41 forks source link

Enhancement Request: Line endings in a text file #26

Closed johnsks closed 9 years ago

johnsks commented 9 years ago

Issue: csv output files created using mETL on linux servers have DOS line endings.

Background: The format of Windows and Linux text files differs slightly. In Windows, lines end with both the line feed and carriage return ASCII characters, but Linux uses only a line feed. As a consequence, some Windows applications will not show the line breaks in Unix-format files. Likewise, Unix programs may display the carriage returns in Windows text files with Ctrl-m (^M) characters at the end of each line.

Enhancement Request: When the files are created on linux servers, we need Linux line endings.

e3krisztian commented 9 years ago

While the csv file is human readable in most cases and looks like a text file, it has defined line endings in RFC4180 Common Format and MIME Type for Comma-Separated Values (CSV) Files as CRLF:

Definition of the CSV Format

...

The ABNF grammar [2] appears as follows:

file = [header CRLF] record *(CRLF record) [CRLF]

So what you was asking for is generation of non-compliant csv files depending on the run-time platform.