Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
There is no way to open a UTF-8 csv file correctly with Excel on UNIX and Windows.
As reported here:
http://stackoverflow.com/questions/6588068/which-encoding-opens-csv-file...
This is the same issue for Drupal 8 as reported for Drupal 7.
Proposed resolution
I propose that the views interface provides an option to include signature (BOM) in the CSV data export.
Remaining tasks
Reviews needed, tests to be written and run.
User interface changes
There is a new option in the CSV style options in the views interface that provides an option to include signature (BOM) in the CSV data export.
API changes
Data model changes
Original report by crystal_alexandre_froger (Drupal 7)
Comment | File | Size | Author |
---|---|---|---|
#12 | views_data_export-add_optional_BOM_for_CSV-2859342-12.patch | 1.48 KB | Juterpillar |
|
Comments
Comment #2
Juterpillar CreditAttribution: Juterpillar at Catalyst IT commentedI've attached a patch.
Please note this patch requires the patch from Support UTF-8 signature in export to work.
Comment #3
Juterpillar CreditAttribution: Juterpillar at Catalyst IT commentedI've attached another patch (messed up the last one, sorry!).
Please note this patch requires the patch from Support UTF-8 signature in export to work.
Comment #4
Juterpillar CreditAttribution: Juterpillar at Catalyst IT commentedComment #5
matthewmessmer CreditAttribution: matthewmessmer commentedComment #6
matthewmessmer CreditAttribution: matthewmessmer commentedPatch #4 fixed this issue for me.
Comment #7
undertext CreditAttribution: undertext as a volunteer commented+1 RTBC
Patch looks good.
Comment #8
hgoto CreditAttribution: hgoto at Studio Umi commentedI also tested the patch #4 with the patch #2859030-1: Support UTF-8 signature in export and it works well for me. Thank you.
Comment #9
khiminrm CreditAttribution: khiminrm at Lemberg Solutions commentedPatch from #4 works for me. Thanks!
Comment #10
dpiThere should probably be an entry in
defineOptions
Otherwise, thanks, the patch looks good
Comment #11
dpiComment #12
Juterpillar CreditAttribution: Juterpillar at Catalyst IT commentedThanks dpi,
I've updated the patch to include an entry in defineOptions.
Comment #13
Juterpillar CreditAttribution: Juterpillar at Catalyst IT commentedComment #14
jibranThe module is still in beta so I don't think we need an upgrade path for this change other than that changes looks good to me.
Comment #16
jhedstromThanks all!