Re: CSV parser

Posted by John, DelphiLand Team on May 10, 2008

In Reply to CSV parser posted by SkSz on May 10, 2008

: hi. CSV parser in lesson 15 has some bug. Line like:

: 12005B,"Calculator Pro",30.49,10

: is parsed correct and give:

: 12005B
: Calculator Pro
: 30.49
: 10

: but if we have something like this:

: 12005B,"Calculator ""Pro"", Calculator ""Basic""",30.49,10

: then result will be:

: 12005B
: Calculator Pro
: Calculator Basic
: 30.49
: 10

: insted of:

: 12005B
: Calculator "Pro", Calculator "Basic"
: 30.49
: 10
-------------------

This is not a bug, as the the text of Lesson 15 says at a certain point:
"To make things not too complicated, let's assume that there are no double quotes nor commas embedded in the field values. In a next version, we'll design a more complete algorithm."

Thanks for pointing out this confusing part. We'll clarify the text and explain explicitly that this "next version" is discussed in lessons 16 and 17.

Thank you for your reaction!

Related articles

       

Follow Ups