Laravel 5.4
maatwebsite/excel 2.1.22
I want to know how to dynamic set encoding when import from CSV file when use chunk importer
All data is not UTF-8 will be remove
https://drive.google.com/file/d/0Bz-YEwnA8p4RTWRHQ09GSDQxWnc/view?usp=sharing
Have you tried the way docs says?
// When utilising a closure, you can pass the input encoding as third parameter.
Excel::load('filename.csv', function($reader) {
}, 'UTF-8');
@aliusa
Oh I am sorry,
I want to know how to dynamic set encoding when use chunk importer. I forgot to add this to question
For people who stumble on this issue from Google Search like I did, this part of the documentation solves this issue: https://docs.laravel-excel.com/3.1/imports/custom-csv-settings.html
You can pass the encoding in the constructor of the Import Class that you create.
Most helpful comment
@aliusa
Oh I am sorry,
I want to know how to dynamic set encoding when use chunk importer. I forgot to add this to question