Hi,
AbstractCsvWriter.escapeString, Line 60, Ver. 1.52:
For column values containing leading whitespace, escaping is turned on.
For trailing whitespace, this is not done.
This can be fixed by adding:
if( csvElem.charAt(lastPos) == whiteSpace ) {
needForEscape = true;
}
at AbstractCsvWriter.escapeString, Line 98.
Unfortunately, I cannot upload files from my office account.
Quoting trailing whitespace, too, is important for all my use cases, as otherwise CsvListReader trims this whitespace away, thereby changing the raw data (Input into CsvListWriter is different from output of CsvListReader).
PS: The if and else branch beginning at line 77 contain the same statements.
Pete
Mr Kasper B. Graversen, I confirm that this is a bug and we have a really trivial patch for this. Could you please update the library?
We can send our patch for you.
I suppose that you find some time to support your project. Thank you!
--
Kind regards,
Ignat Alexeyenko.
I've fixed this for the upcoming release (see revision 228).
Thanks for the suggestions - I'll be adding you as a contributor to the pom :)