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
I would like to import a text-file that uses only delimiter characters and no enclosure characters, like: value1;value2;value3 etc.
If I try to set the enclosure character to an emtpy string, false or null I get the following error:
"Warning: SplFileObject::setCsvControl(): enclosure must be a character in project/vendor/goodby/csv/src/Goodby/CSV/Impor\/Standard\/Lexer.php line 51
In order to make it work I've changed the the SplFileObject that is beeing used in the Lexer.php, namely $csv->setCsvControl($delimiter, $enclosure, $escape);
The only way I have managed to parse a file without enclosures was to change $csv->setCsvControl($delimiter, $enclosure, $escape); to $csv->setCsvControl($delimiter);. This worked for me since I did not use the escape character anyway, but I was wondering if there was a better way to accomplish this.
The text was updated successfully, but these errors were encountered:
I would like to import a text-file that uses only delimiter characters and no enclosure characters, like:
value1;value2;value3
etc.If I try to set the enclosure character to an emtpy string, false or null I get the following error:
In order to make it work I've changed the the SplFileObject that is beeing used in the Lexer.php, namely
$csv->setCsvControl($delimiter, $enclosure, $escape);
The PHP-documentation
SplFileObject::setCsvControl
lists three optional parameters: $delimiter, $enclosure and $escape www.php.net/manual/en/splfileobject.setcsvcontrol.phpThe only way I have managed to parse a file without enclosures was to change
$csv->setCsvControl($delimiter, $enclosure, $escape);
to$csv->setCsvControl($delimiter);
. This worked for me since I did not use the escape character anyway, but I was wondering if there was a better way to accomplish this.The text was updated successfully, but these errors were encountered: