Export: add field value delimiter to string fields #599

Closed
opened 2025-12-29 16:23:41 +01:00 by adam · 4 comments
Owner

Originally created by @Armadill0 on GitHub (Jan 3, 2017).

Originally assigned to: @jeremystretch on GitHub.

If you export data and reimport it and there are description fields containing commas, those would lead to wrong data imports.

On fields which can contain user defined strings, it would be great to have a double quote field value delimiter, to avoid such problems. This is also covered by the CSV RFC: https://tools.ietf.org/html/rfc4180 (paragraph 2.5 and 2.6)

Originally created by @Armadill0 on GitHub (Jan 3, 2017). Originally assigned to: @jeremystretch on GitHub. If you export data and reimport it and there are description fields containing commas, those would lead to wrong data imports. On fields which can contain user defined strings, it would be great to have a double quote field value delimiter, to avoid such problems. This is also covered by the CSV RFC: https://tools.ietf.org/html/rfc4180 (paragraph 2.5 and 2.6)
adam added the type: bug label 2025-12-29 16:23:41 +01:00
adam closed this issue 2025-12-29 16:23:41 +01:00
Author
Owner

@jeremystretch commented on GitHub (Jan 3, 2017):

it would be great to have a double quote field value delimiter, to avoid such problems.

This has already been implemented (#422). Have you found a specific area where it isn't working?

@jeremystretch commented on GitHub (Jan 3, 2017): > it would be great to have a double quote field value delimiter, to avoid such problems. This has already been implemented (#422). Have you found a specific area where it isn't working?
Author
Owner

@Armadill0 commented on GitHub (Jan 3, 2017):

I explicitly found it for "Role" of the Prefixes export. I'll have a look in my other exports tomorrow if there are more occurences.

@Armadill0 commented on GitHub (Jan 3, 2017): I explicitly found it for "Role" of the Prefixes export. I'll have a look in my other exports tomorrow if there are more occurences.
Author
Owner

@jeremystretch commented on GitHub (Jan 3, 2017):

Oh my mistake, I was only looking at import. Yeah, we can add this to the to_csv() method on models with export capability.

@jeremystretch commented on GitHub (Jan 3, 2017): Oh my mistake, I was only looking at import. Yeah, we can add this to the `to_csv()` method on models with export capability.
Author
Owner

@Armadill0 commented on GitHub (Jan 3, 2017):

Great, thanks! 😄

@Armadill0 commented on GitHub (Jan 3, 2017): Great, thanks! :smile:
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#599