[Cuis-dev] Can't parse CSV data from file

Hilaire Fernandes hfern at free.fr
Sat Jul 22 14:58:40 PDT 2023


Hi,

In the first scenario bellow, the csv content is read correctly, the 
header is the expect array with 3 items.

In the second scenario, where the same content is read from the 
timeSlot.csv file, the header is not correctly interpreted, indeed an 
array with only one string is returned.

It is like if the comma is not interpreted as a field separator.

In the first scenario the data is a String, in the second the file 
content is instantiated as an UnicodeString.

To reproduce, install NeoCSV package from my forked repository

( NeoCSVReader on: 'timeSlotName,start,end
P1,7:45,8:30
P2,8:35,9:20' readStream) readHeader.

=> #('timeSlotName' 'start' 'end') .


( NeoCSVReader on: 'timeSlot.csv' asFileEntry readStream) readHeader.

=> #('timeSlotName,start,end') .

Thanks

Hilaire



More information about the Cuis-dev mailing list