sync-magento-2-migration icon indicating copy to clipboard operation
sync-magento-2-migration copied to clipboard

Mismatch between import and export CSV enclosure characters

Open erfanimani opened this issue 2 years ago • 5 comments

Export uses a single quote ': https://github.com/EcomDev/sync-magento-2-migration/blob/main/src/CsvFactory.php#L56

Import uses double quotes ": https://github.com/EcomDev/sync-magento-2-migration/blob/main/src/CsvReader.php#L24

Bug introduced in this commit: https://github.com/EcomDev/sync-magento-2-migration/commit/518807c02088e4ff6a0cbd4a09786e9d57bc12cd

erfanimani avatar Jul 17 '22 07:07 erfanimani

Well spotted, for context, the site used was USA based with Inch (") character everywhere in fields, example '10" Pipe'

ProxiBlue avatar Jul 17 '22 08:07 ProxiBlue

Consider I then later introduced 'and base64 encode/decode options' I think the change was in fact no longer needed to adjust to ' ( from " )

So, I would say that should have been removed, as the fields would then be encoded, and not textual

ProxiBlue avatar Jul 17 '22 08:07 ProxiBlue

Cool, yeah it would not be needed in that case. This would also be a pretty big BC break I imagine (if others are using this).

erfanimani avatar Jul 17 '22 08:07 erfanimani

agreed. is also why I added encode/decode as an option, so it is BC. I had the issue with textuals using " character in a lot of places, so encode/decode made more practical sense, and worked a charm.

ProxiBlue avatar Jul 17 '22 08:07 ProxiBlue

the best fix would be to revert back to " in all code ;) so it was same as before, preventing BC break

ProxiBlue avatar Jul 17 '22 08:07 ProxiBlue