ranjithrp edited a comment on issue #46: added ignoreQuoteInToken support to 
ignore quotes in strings
URL: https://github.com/apache/commons-csv/pull/46#issuecomment-504688145
 
 
   > Would you mind showing an example with actual expected rows please? It is 
not clear to me yet if this is a good thing.
   
   In the actual expected row, we have one column which has value with quotes 
in it, and other column which has a comma in it.  
   Ex row -
   abc,"xyz" 123 bar,3,11961034,"First author, Second Author"
   
   Here the second column has value "xyz" 123 bar. This has quotes in the token
   The 5th column has value First author, Second Author. This has comma in the 
token
   
   if i use withQuote(null), it ignores the quote for the fifth column and then 
splits that value to 2.
   If i dont use withQuote(null), for the second column, the lexer tries to 
parseEncapsulatedToken and when it sees character other than delimiter or 
newline, it throws exception. 
   
   This was the problem we were facing, and to handle this, i had made the 
above change. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to