On Sat, 11 Sep 2010, Vladimir Zhirov wrote:

Lukasz Sokol wrote:
For a good understanding: TStrings is not a substitute for a CSV
kind of format. Any attempt at using it for that is doomed to fail.
Use a proper CSV format handling class if you need CSV. For
example, the sdfdataset unit delivered with FPC contains one such
class.

Well it works for 'simplest' case(s); I'll have a look at sdfdataset
(time allowing).

You may also want to have a look at CSVDocument class
(http://wiki.freepascal.org/CsvDocument). I tried to handle all corner
cases when implementing it, including line breaks within quoted text.
It is likely to be somewhat slower than sdfdataset though, since it
uses variable-length string values instead of fixed-length.

Just to be complete:
the sdfdataset unit contains a variable-length component as well.

Michael.

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to