solspace / craft-freeform

Freeform for Craft: The most reliable form builder that's ready for wherever your project takes you.
https://docs.solspace.com/craft/freeform/v5/
Other
48 stars 61 forks source link

Character encoding issue in CSV export of submissions #1593

Closed paulgoodfield closed 1 week ago

paulgoodfield commented 1 month ago

What happened?

We have an automated export set up to send out a CSV export of submissions from a specific form. One of the fields that it is included in the export contains a '£' character. When the user opens up that file in their spreadsheet software (MS Excel I believe), the '£' character is getting replaced with an '£' character. I believe this might be due to a character encoding issue on the file?

It's worth noting that the setup we have is quite complex and the field values containing the '£' character on the submissions are getting set from PHP in a custom module.

Errors and Stack Trace (if available)

No response

How can we reproduce this?

  1. Install Freeform version 4.1.22
  2. Set up a form and make some test submissions where the field values contain the '£' character
  3. Set up an automated export to send a CSV of these submissions

Freeform Edition

Pro

Freeform Version

4.1.22

Craft Version

4.12.7

When did this issue start?

Fresh install of Freeform

Previous Freeform Version

No response

kjmartens commented 2 weeks ago

Sorry for the delay and the trouble @paulgoodfield,

I played around with this on my end and I can't seem to duplicate it. However, I am using Apple Numbers to open the CSV file and don't currently have a way to test Excel on Windows (?).

Is this issue still happening for you? And do you have the option to test on a Mac with Numbers or Excel and see if the issue happens there as well?

It would also be good if you could provide us more context about the setup and encoding used, how the values look in the database, etc. Or even send us a copy of the exported CSV for us to review. 🙂

paulgoodfield commented 1 week ago

@kjmartens Thanks for the reply. I've since spoken to the client in question and the issue seems to have been resolved by just changing the export format from CSV to Excel.