[Lazarus] TStringList : how should it behave on Delimiter = ' ' ?
Lukasz Sokol
el.es.cr at gmail.com
Fri Sep 10 11:20:51 CEST 2010
On 08/09/2010 23:45, Michael Van Canneyt wrote:
>
>
> On Wed, 8 Sep 2010, Hans-Peter Diettrich wrote:
>
>> Lukasz Sokol schrieb:
>>
>>> I know this is possibly a corner case, when Delimiter = ' '; but
>>> there seems something wrong with the logic in SetDelimitedText... ?
>>
>> That was my opinion as well, when I had a look at the code some time ago. Either we copy the Delphi code, for compatibility, or we provide our own exact (and meaningful) definition of the behaviour.
>
> The Delphi compatible behaviour must be followed, and is currently implemented.
> Delphi and FPC give the same output with the testdata provided. Thus, no change is required.
OK, so I stand corrected :/
>
> 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).
> Michael.
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>
More information about the Lazarus
mailing list