Force field enclosure

Created on 6 November 2017, over 6 years ago
Updated 17 January 2024, 5 months 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 work

Version

4.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 7 months 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.

Production build 0.69.0 2024