One Star

Change newline in FileOutputDelimited to CRLF

Hi!
How can I change the newline in FileOutputDelimited to CRLF?
It only uses a CHAR, though it accepts a string but then ignores everything but the first sign!
Ideas?
TIA
Andre
5 REPLIES
One Star

Re: Change newline in FileOutputDelimited to CRLF

Hi Andre,
use "\r\n" instead.
Bye
Volker
One Star

Re: Change newline in FileOutputDelimited to CRLF

Hi,
I can't! As I wrote - admittedly not too clearly - csvwriter ignores everything but the first character as a newline, since it manages the newline internally as a "char"-datatyped value. No String possible here!
If one would be able to not define the value in the component (which is not possible, as the property is required) the csvwriter instance of the component would use the system property "line.separator" as a newline. But changing this is not what I want! It is anything but a feasible workaround.
More ideas? currently I sent the generated file to an external converter tool. ugly Smiley Happy
TIA
Andre
One Star

Re: Change newline in FileOutputDelimited to CRLF

Hi Andre,
which version are you using. I took a look at the 3.1.3 code and for me it looks like the row separator is defined as TEXT in the xml-definition-file and handled as String in the code.
And default value is "\n" a String too.
Bye
Volker
One Star

Re: Change newline in FileOutputDelimited to CRLF

The property is a string, but internally it uses a class named CSVWriter, which only uses a char as the line separator.
Employee

Re: Change newline in FileOutputDelimited to CRLF

@ORBIT_Andre
Have you tried it?
The underlying code just appends the line separator to the end of the current row, so any string is valid.