View Issue Details

IDProjectCategoryView StatusLast Update
0038780FPCPackagespublic2021-04-20 22:50
Reporterdave Liewald Assigned ToMichael Van Canneyt  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionno change required 
OSLinux 
Product Version3.2.1 
Summary0038780: parsing error with strutils extractword
Descriptionif a csv field contains a ' " ' delimited string and contains a ',' then the field indexing fails and counts all of the ',' delimiters as individual fields
Steps To Reproducecreate a csv with one field like "[2,3][3,4][2,3]" with some other fields and then try to extract individual fields using extractword or extractdelimited from strutils
TagsNo tags attached.
Fixed in Revision
FPCOldBugId
FPCTarget-
Attached Files

Activities

Michael Van Canneyt

2021-04-20 22:50

administrator   ~0130485

ExtractWord is not meant to handle quotes, so this behaviour is perfectly normal.

If you want to handle CSV correctly, use the csvdocument or csvdataset units.
They are designed to correctly handle CSV and quoting.
If you don't need the TDataset overhead, just use the TCSVDocument class.

Issue History

Date Modified Username Field Change
2021-04-20 22:19 dave Liewald New Issue
2021-04-20 22:50 Michael Van Canneyt Assigned To => Michael Van Canneyt
2021-04-20 22:50 Michael Van Canneyt Status new => resolved
2021-04-20 22:50 Michael Van Canneyt Resolution open => no change required
2021-04-20 22:50 Michael Van Canneyt FPCTarget => -
2021-04-20 22:50 Michael Van Canneyt Note Added: 0130485