vscode_rainbow_csv icon indicating copy to clipboard operation
vscode_rainbow_csv copied to clipboard

CSV with newlines inside quoted field does not work

Open Hipska opened this issue 1 month ago • 2 comments

While #4 has been marked as resolved, it still doesn't seem supported or working as expected.

Given the same example CSV:

Key,Text
X,"Hello, mechatroner,
This, incorrectly interpreted as a new row with two columns"

Results in this with current version 3.23.0:

Image

This results in also the align option not to work as it gives the following error:

[!CAUTION] Unable to align: Inconsistent double quotes at line 2

Hipska avatar Nov 24 '25 08:11 Hipska

The problem most likely is failed autodetection - multiline fields work only with "dynamic_csv" filetype, but not with CSV - what filetype does it show in the bottom right corner for you? I guess this sounds a bit strange but there are benefits to this approach and in most cases autodetection would set the filetype correctly to "dynamic_csv" when it parses a file with multiline fields. Autodetection sometimes doesn't work correctly when file is too small or when it was typed-in manually. I believe even pasting CSV data into an empty file should trigger autodetection in most cases.

mechatroner avatar Nov 25 '25 02:11 mechatroner

It seems indeed to work in dynamic mode. Why doesn’t it work in regular (comma, semicolon, …) mode?

Hipska avatar Nov 25 '25 06:11 Hipska