Hi list,
With regard to bug
19610 TStringList.delimitedtext doesn't respect quotechar I decided to expand the del4.zip test program in that report to a compiler test suite test program for stringlist.delimitedtext/sdf format. That will make it a lot easier to keep track of FPC's compliance with the sdf spec.
Assuming we want to be Delphi compatible, it would be nice to know what Delphi exactly produces though (because it differs a bit from what the Delphi help files say).
Please find attached the test program; it runs without errors on Turbo Delphi 2006 (I renamed the file to .dpr to easily compile it).
Due to bug 19610 (and perhaps more) it doesn't currently on FPC.
1. Could you please run this on other versions of Delphi and report back the results (presumably older versions will not run the test with commatext)
2. Additional tests welcome
As an aside, in bug 19610 I proposed writing out an sdf format that is always enclosed in quotes; this leads to unambiguous import of .delimitedtext.
To ensure this is feasible (i.e. Delphi can handle this), some tests in the program verify this.
E.g. my Turbo Delphi 2006 is returns the same data for strictdelimiter both true and false for these "safely quoted" strings, which is not the case for other sdf output.
Thanks,
Reinier
