Force field enclosure

Created on 6 November 2017, about 7 years ago
Updated 7 July 2022, over 2 years ago

Hi,

I'm using this module (thanks for the good work) on a D8 site. I've built a view which generates CSV files, it's working great. But I noticed that some values are enclosed by '"', and some ar not. For example I get this line :

5232,011700003,carolyn@test.com,"555 AVE DE TEST",01170, ...

...where numeric fields are not enclosed while strings are. Is it by design ? Can I force the use of double quote enclosed values ?

Thanks again

✨ Feature request
Status

Needs review

Version

1.0

Component

Documentation

Created by

πŸ‡«πŸ‡·France flo81

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States rogernyc

    csv_serialization_enclosure-2921350-8.patch worked here
    Using CSV Serialization 8.x-2.1
    Thanks!

  • Status changed to Needs work about 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States markdorison

    Patch no longer applies cleanly against the 4.x branch. Please create an MR against 4.x.

  • πŸ‡§πŸ‡ͺBelgium chewi3

    I updated the patch from #9 so that it applies against 4.0 release. I did notice that EncloseField is marked as deprecated, so we should probably look into a more long term solution before we can think about merging this.

  • πŸ‡³πŸ‡±Netherlands anneke_vde

    I created a new patch so that it applies against the latest 4.x branch, I used the forceEnclosure method because the EncloseField is marked as deprecated.

    Not included the settings

  • πŸ‡³πŸ‡±Netherlands anneke_vde

    Uploaded the wrong patch, here is the correct one.

Production build 0.71.5 2024