swiftcsv / SwiftCSV

CSV parser for Swift
MIT License
947 stars 190 forks source link

Columns are silently lost if multiple columns have the same name #134

Open jverkoey opened 8 months ago

jverkoey commented 8 months ago

Example:

en,comment,de,en,en-GB,fr,es,it
,,,,,,,
Efficiency,,,,,,,
%@,,,,,,,

In this case, the "Efficiency" row will appear as an empty row when printed because there are two columns named en.

The fix is to not have duplicate column names, because they're being treated as keys, but this type of issue would ideally be thrown as an error to make it clear that unexpected behavior is happening.