commit
bfa7c34d17
@ -81,6 +81,7 @@ public class CsvExporter implements WriterExporter{
|
||||
JSONUtilities.getString(options, "separator", Character.toString(this.separator));
|
||||
final String lineSeparator = options == null ? CSVWriter.DEFAULT_LINE_END :
|
||||
JSONUtilities.getString(options, "lineSeparator", CSVWriter.DEFAULT_LINE_END);
|
||||
final boolean quoteAll = options == null ? false : JSONUtilities.getBoolean(options, "quoteAll", false);
|
||||
|
||||
final boolean printColumnHeader =
|
||||
(params != null && params.getProperty("printColumnHeader") != null) ?
|
||||
@ -110,7 +111,7 @@ public class CsvExporter implements WriterExporter{
|
||||
cellData.text :
|
||||
"";
|
||||
}
|
||||
csvWriter.writeNext(strings, false);
|
||||
csvWriter.writeNext(strings, quoteAll);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -96,12 +96,13 @@ public class SeparatorBasedImporter extends TabularImportingParserBase {
|
||||
}
|
||||
sep = StringEscapeUtils.unescapeJava(sep);
|
||||
boolean processQuotes = JSONUtilities.getBoolean(options, "processQuotes", true);
|
||||
boolean strictQuotes = JSONUtilities.getBoolean(options, "strictQuotes", false);
|
||||
|
||||
final CSVParser parser = new CSVParser(
|
||||
sep.toCharArray()[0],//HACK changing string to char - won't work for multi-char separators.
|
||||
CSVParser.DEFAULT_QUOTE_CHARACTER,
|
||||
(char) 127, // we don't want escape processing try DEL as a rare character until we can turn it off
|
||||
CSVParser.DEFAULT_STRICT_QUOTES,
|
||||
strictQuotes,
|
||||
CSVParser.DEFAULT_IGNORE_LEADING_WHITESPACE,
|
||||
!processQuotes);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user