WPIntell

Source evidence

Change CSV Charset

GravityExport Lite for Gravity Forms · support · 2024-06-28T11:57:00+00:00

mixedsentiment
mediumseverity
0.84relevance
5replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

8 / 36 rows with source links

22.2% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

28 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
Torsten Händler resolved
Hello, Is it possible to change the charset of a CSV File? When we export a CSV it is at UTF-8, but we need it as ISO-8859-1 because we import it to another system and this only accept the ISO charset. So we are looking for a way to change the charset of the CSV but we didn’t find any filter or actions. Is there a way to do this? Best regards Hi @shogathu , I looked into it, and you’re right that there isn’t a hook or filter for this. I currently see no way to make this happen, so I’ll try to add a filter for you next week. I’ll let you know when this is released. Kind regards, Doeke Hello Doeke, thanks for take a look into this. So as we need it fast, we make it happened for us by change 1 line of code while creating the file. This make the work for us and we will wait for an update. gf-entries-in-excel/build/vendor_prefixed/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Csv.php:131 we added $cellsArray[0] = mb_convert_encoding($cellsArray[0],’ISO-8859-1′ ); Best regards Shogathu … wrong account. This reply was modified 1 year, 10 months ago by Apogi . Reason: wrong account Hi @shogathu , I just wanted to let you know that we’ve released 2.3.0 of GravityExport Lite; which now includes a gfexcel_renderer_csv_output_encoding hook to update the character encoding for the CSV output. Something along these lines should do the same for you: add_action( 'gfexcel_renderer_csv_output_encoding', function ( string $encoding ): string { return 'ISO-8859-1'; } ); Hope this helps! Kind regards, Doeke Hi @doekenorg thanks for the filter, that helps a lot Best regards shogathu

Comments

5 shown
Doeke Norg 2024-06-28T18:42:00+00:00

Hi @shogathu , I looked into it, and you’re right that there isn’t a hook or filter for this. I currently see no way to make this happen, so I’ll try to add a filter for you next week. I’ll let you know when this is released. Kind regards, Doeke

Torsten Händler 2024-07-01T08:24:00+00:00

Hello Doeke, thanks for take a look into this. So as we need it fast, we make it happened for us by change 1 line of code while creating the file. This make the work for us and we will wait for an update. gf-entries-in-excel/build/vendor_prefixed/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Csv.php:131 we added $cellsArray[0] = mb_convert_encoding($cellsArray[0],’ISO-8859-1′ ); Best regards Shogathu

Apogi 2024-07-05T08:07:00+00:00

… wrong account. This reply was modified 1 year, 10 months ago by Apogi . Reason: wrong account

Doeke Norg 2024-07-05T08:09:00+00:00

Hi @shogathu , I just wanted to let you know that we’ve released 2.3.0 of GravityExport Lite; which now includes a gfexcel_renderer_csv_output_encoding hook to update the character encoding for the CSV output. Something along these lines should do the same for you: add_action( 'gfexcel_renderer_csv_output_encoding', function ( string $encoding ): string { return 'ISO-8859-1'; } ); Hope this helps! Kind regards, Doeke

Torsten Händler 2024-07-05T12:44:00+00:00

Hi @doekenorg thanks for the filter, that helps a lot Best regards shogathu