Support for multi-char-separators in CSV

This change requires that the following patch is applied to OpenCSV:

http://sourceforge.net/tracker/index.php?func=detail&aid=3599477&group_id=148905&atid=773543
This commit is contained in:
Frank Wennerdahl 2013-01-18 16:28:27 +01:00
parent f1387bdb24
commit f837643f1e

View File

@ -97,7 +97,7 @@ public class SeparatorBasedImporter extends TabularImportingParserBase {
boolean processQuotes = JSONUtilities.getBoolean(options, "processQuotes", true); boolean processQuotes = JSONUtilities.getBoolean(options, "processQuotes", true);
final CSVParser parser = new CSVParser( final CSVParser parser = new CSVParser(
sep.toCharArray()[0],//HACK changing string to char - won't work for multi-char separators. sep,
CSVParser.DEFAULT_QUOTE_CHARACTER, CSVParser.DEFAULT_QUOTE_CHARACTER,
(char) 0, // escape character (char) 0, // escape character
CSVParser.DEFAULT_STRICT_QUOTES, CSVParser.DEFAULT_STRICT_QUOTES,