You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@JiRysavy this is an expected behaviour in how arrays are being presented in PHP. The enclosure you see are part of array representation but not par of your CSV document.
@codespearhead the behaviour has nothing to do with RFC4180.
Bug Report
Enclosure around words is not removed
| 9.14 | |
| 8.1 | |
| Docker on Ubuntu 22.04|
I have some trouble with reading cells data surrounded with ".
I have CSV that looks something like:
"h1";"h2";"h3";"h4";"h5";
"d1";"d2";"d3";"d4";"d5";
"l1";"l2";"l3";"l4";"l5";
and code:
$csv = Reader::createFromPath($filePath, 'rb'); $csv->setHeaderOffset(0) ->setDelimiter(';') ->setEnclosure('"');
I expect, the
getResults
return to be:[
[
'h1' => 'd1',
'h2' => 'd2',
'h3' => 'd3',
'h4' => 'd4',
'h5' => 'd5',
],
[
'h1' => 'l1',
'h2' => 'l2',
'h3' => 'l3',
'h4' => 'l4',
'h5' => 'l5',
]
], but actual result is:
[
[
'"h1"' => '"d1"',
'"h2"' => '"d2"',
'"h3"' => '"d3"',
'"h4"' => '"d4"',
'"h5"' => '"d5"',
],
[
'"h1"' => '"l1"',
'"h2"' => '"l2"',
'"h3"' => '"l3"',
'"h4"' => '"l4"',
'"h5"' => '"l5"',
]
],
The text was updated successfully, but these errors were encountered: