42BV / CSVeed

Light-weight, easy-to-use Java-based CSV utility

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Not using CRLF as line separator for writing as per specification?

mparaz opened this issue · comments

In RowWriterImpl:
writer.write(rowInstructions.getEndOfLine());

which is:
return this.symbolMapping.getFirstMappedCharacter(EncounteredSymbol.EOL_SYMBOL);

which is only ever one character, the \r of the \r\n:
char[] mappedCharacters = symbolToChars.get(encounteredSymbol); return mappedCharacters == null ? 0 : mappedCharacters[0];

As a workaround, I passed in a Writer that overrides write(int)

👍

This should be fixed in the latest version