View Issue Details

IDProjectCategoryView StatusLast Update
0019934phpList 3 applicationSubscriber Importpublic07-10-19 17:47
Reportervaceklu 
PriorityhighSeverityfeatureReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.4.1 
Target Version3.4.7Fixed in Version3.4.7 
Summary0019934: Parse CSV by CSV standard - rfc4180
DescriptionPhplist don't parse csv defined by rfc 4180 specialy point 6. I have a file that is separated by ";" and each column is in double quotes. In double quotes I have a newline. Example of that file is in attachments. I want to import that file by options "Import by uploading a CSV file with email addresses and additional data". Problem is that phplist takes newline in double quotes as two records not one. This is possible see in second attachment.

By RFC 4180 is possible to write newline in double quotes and it will be taken as newline in the column not the end of line.

This is happening from version 3.2.5 to 3.4.1.
Steps To ReproduceCreate similar file to in attachment and try to import it.
TagsNo tags attached.

Activities

vaceklu

10-05-19 13:33

reporter  

michiel

11-05-19 10:47

manager   ~0062190

Yes, we should rewrite that part using https://php.net/fgetcsv
I think that didn't exist yet, when I wrote this.

vaceklu

14-08-19 13:53

reporter   ~0062614

Good day,
is there any update in that issue? Will be parsing of csv files correctly in the newest version of PHPlist? If it is now then sorry for my blindness. :)

Thank you,
Lukáš Vacek

samtuke

14-08-19 14:32

administrator   ~0062615

@vaceklu No unfortunately that hasn't changed in phpList 3.4.5; only CSV exports were affected, I believe, not imports. But changing the import process should not be very complicated -- feel free to work on a patch / pull request, and let other know if they can help in case you try.

samtuke

10-09-19 13:18

administrator   ~0062681

PR by @vaceklu https://github.com/phpList/phplist3/pull/585