Add UTF-8 BOM when exporting with useList option (#4873)

Same as #1958 but when using the list controller without an ExportModel (with `useList` in the export options)
This commit is contained in:
Fl0Cri 2020-03-26 20:17:51 +01:00 committed by GitHub
parent 6dbfdd7e65
commit bd2a774a58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -619,6 +619,7 @@ class ImportExportController extends ControllerBehavior
* Prepare CSV
*/
$csv = CsvWriter::createFromFileObject(new SplTempFileObject);
$csv->setOutputBOM(CsvWriter::BOM_UTF8);
$csv->setDelimiter($options['delimiter']);
$csv->setEnclosure($options['enclosure']);
$csv->setEscape($options['escape']);