Closed luckydonald closed 1 year ago
@luckydonald The UT8 BOM is enabled by default in the config file: https://github.com/vitorccs/laravel-csv/blob/master/config/csv.php#L36
Here you can see it is being generated: https://github.com/vitorccs/laravel-csv/blob/master/src/Handlers/StreamHandler.php#L59
https://github.com/vitorccs/laravel-csv/blob/master/src/Helpers/CsvHelper.php#L30
I get the feeling the boom itself should be configurable once you need UTF-16, etc. However not in my case, utf-8 works fine here.
Btw, best to use permanent links (by pressing y when having the file open). Also it gives neat previews:
Permalinks for the links above:
@luckydonald thanks for the tip. I am closing the issue.
I need to set the UTF-8 BOM, for example as seen in the league/csv docs
Can I somehow get hold of that$csv
add that somewhere?Edit: If I read correctly this isn't even using league/csv, so that doesn't really helps.
But in my case I just would need to prepend
$utf8_bom = "\xEF\xBB\xBF";
(the BOM for UTF-8) to the returned CSV.