php - Error unicode export csv file - Laravel/Excel -


i have problem, can guys me ?

i use maatwebsite/laravel-excel export japanese text database csv file.

when open export file using ms excel, got lot of symbols.

enter image description here

but when open using notepad++ or upload google drive, got want.

enter image description here

how can fix ?

this code :

    public function export($type, $properties, $data) {     if (in_array($type, self::export_type)) {         try {             $export = excel::create($properties['_title'], function ($excel) use ($data, $properties) {                 $excel->sheet('sheet', function ($sheet) use ($data) {                     foreach ($data $item) {                         $sheet->fromarray($item);                     }                 });             })->export('csv');         } catch (exception $error) {             throw $error;         }     } } 

i solved it. if 1 problem, try edit config/excel.php : change 'use_bom' => false 'use_bom' => true.

hope helpful !


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -