I using Laravel Excel for export CSV file in Laravel. How can I set the encoding for export csv file.
I have tried several ways:
-
Change config in excel.php
'use_bom' => false,
-
Use mb_convert_encoding to convert content to before export.
$exportData = mb_convert_encoding($exportData, "SJIS", "UTF-8");
$pblClassExport = new \App\Exports\PblClassExport($exportData, 'test.csv');
But it's not working. The encoding of csv file auto change by file content :( I hope get your help. Thank you so much!
https://stackoverflow.com/questions/65838394/how-can-i-set-encoding-for-export-csv-with-laravel-excel-in-laravel January 22, 2021 at 10:07AM
没有评论:
发表评论