Skip to content

Commit

Permalink
Merge pull request #195 from GravityKit/feature/csv-character-encoding
Browse files Browse the repository at this point in the history
Allow changing CSV character encoding
  • Loading branch information
mrcasual authored Jul 4, 2024
2 parents 3cf4310 + 1c21e70 commit 769c827
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Donate link: https://www.gravitykit.com/extensions/gravityexport/?utm_source=plu
Tags: Gravity Forms, GravityForms, Excel, Export, Entries
Requires at least: 4.0
Requires PHP: 7.2
Tested up to: 6.5.3
Tested up to: 6.6.0
Stable tag: 2.2.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Expand Down Expand Up @@ -259,6 +259,7 @@ You can hide a row by adding a hook. Checkout this example:
= develop =

* Updated: PhpSpreadsheet to [1.19.0](https://github.com/PHPOffice/PhpSpreadsheet/releases/tag/1.19.0)
* Enhancement: Added a `gfexcel_renderer_csv_output_encoding` hook to set the character encoding on the CSV.

= 2.2.0 on March 8, 2024 =

Expand Down
File renamed without changes.
6 changes: 6 additions & 0 deletions src/Renderer/AbstractPHPExcelRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -488,5 +488,11 @@ private function setCsvProperties( Csv $objWriter ): void {
$objWriter->getIncludeSeparatorLine(),
$form_id
) );

$objWriter->setOutputEncoding( (string) gf_apply_filters(
[ 'gfexcel_renderer_csv_output_encoding', $form_id ],
$objWriter->getOutputEncoding(),
$form_id
) );
}
}

0 comments on commit 769c827

Please sign in to comment.