Problem importing tab-separated file

I’ve just some time tracking down the issue with an import failing, with the error:
array_combine(): Both parameters should have an equal number of elements

The file being imported is a tab-separated text file, itself generated from a database - so the number of fields/separators in each record is correct (I double-checked anyway). The file contains about 7000 records containgin about 25 fields, including some long text fields.

I tracked the problem down to a double quotation mark in one of records. The field concerned started:
"Esta edición presenta la
If I removed the leading double quote the import worked.
Also, if I moved the double quote so it wasn’t at the beginning of the field, eg:
Esta "edición presenta la
it worked.

There are a number of other records with double quotes like this but only this record caused a problem. I’ve had problems before importing text files (nothing to do with Wappler) where double quotation marks within a field were not paired, but I wouldn’t expect this to be a problem with tab-separated data. In any case, some of the other records contained unpaired double quotations marks.

I appreciate the feature in Wappler is called CSV import, but it works fine with tab-separated files if the correct delimiter is specifed. Could Wappler nevertheless be checking the integrity of a file, taking double quotation marks into account (unnecessarily)?

A couple of my customers have used this process without any problems during the last few months. It seems there is a very specific problem and I can’t identify it. However I wouldn’t have thought it should be an issue so perhaps there is a bug somewhere when it comes to tab-separated data.

Community Page
Last updated: