Proposal for comment line event handler
A fast, programmer-friendly, free CSV library for Java
Brought to you by:
jamesbassett,
kbg
Since V2.1.0 CsvPreference can define a CommentMatcher to direct csv reader to skip comment lines (like never existed). Sometime comment line can include hint/instruction that will effect how to parse coming lines.
It is helpful to implement something like comment-line event handler, inside which hint/instruction can be retrieved rather than discard it.
Ticket moved from /p/supercsv/bugs/41/
That's an interesting idea, but I'm curious what kind of 'instructions' the comments would have and how the processing would change (different processors? mapping to a different bean class?). Can you give some examples (CSV)?
Giving an example, we are developing an Eclipse RCP application with multi-locale support, which can import CSV file modified and saved in Excel by users. Number format symbols (or decimal mark, see http://en.wikipedia.org/wiki/Decimal_mark) can vary in different area around the world. To make sure to parse formatted number correctly, user can insert a comment line to instruct how to parse coming lines.
Here is a supposed sample CSV:
<HR>
Last edit: Feng Dihai 2013-04-26