boost tokenizer to parse csv file with embedded double quote

823 Views Asked by At

Is any way to parse CSV using c++ boost tokenizer if embedded double-quote characters are represented by pair of double-quote characters?

Wiki's article Comma-separated values says Each of the embedded double-quote characters must be represented by a pair of double-quote characters and provides the following example of csv file:

Year,Make,Model,Description,Price

1997,Ford,E350,"ac, abs, moon",3000.00

1999,Chevy,"Venture ""Extended Edition""","",4900.00

1999,Chevy,"Venture ""Extended Edition, Very Large""",,5000.00

1996,Jeep,Grand Cherokee,"MUST SELL!

air, moon roof, loaded",4799.00

Default boost tokenizer typedef tokenizer< escaped_list_separator<char> > tokenizer; removes embedded quotas but works fine if use \" instead of "".

0

There are 0 best solutions below