When I export my CSV file, I would like to export it as an UTF-8 encoded CSV file as you can do in Microsoft Excel and soforth.
Laravel 4.2
In the CSV characters like æ, ø and å should be displayed in stead of engsøparken and soforth.
In stead of outputting "engsøparken", it outputs "engsøparken".

This package exports UTF-8 by default. Please check if your application is configured correctly.
Same issue here. Laravel 5.2 and controller is an UTF-8 file. Please, reopen :laughing:
Just got it working with these settings. Everything is UTF-8.
A CSV is exported and opened with Excel 2010. German Umlauts are shown correctly.
They were shown wrong before, when use_bom was false.
[
'exports' => [
…
'csv' => [
'delimiter' => ';',
'enclosure' => '"',
'line_ending' => PHP_EOL,
'use_bom' => true,
'include_separator_line' => false,
'excel_compatibility' => false,
],
]
]
return Excel::download(
new MyExport($data), "{$slug}.csv",
\Maatwebsite\Excel\Excel::CSV
);
Just got it working with these settings. Everything is UTF-8.
A CSV is exported and opened with Excel 2010. German Umlauts are shown correctly.
They were shown wrong before, when use_bom was false.[ 'exports' => [ … 'csv' => [ 'delimiter' => ';', 'enclosure' => '"', 'line_ending' => PHP_EOL, 'use_bom' => true, 'include_separator_line' => false, 'excel_compatibility' => false, ], ] ]return Excel::download( new MyExport($data), "{$slug}.csv", \Maatwebsite\Excel\Excel::CSV );
This worked for me, thanks!!!
Most helpful comment
Same issue here. Laravel 5.2 and controller is an UTF-8 file. Please, reopen :laughing: