title: How to fix LaravelExcel UTF-8 Characters
body: <p>I'm using Laravel 5.8 and I want to download data from view with LaravelExcel. Here is my Export Class:</p>
  <pre><code>namespace App\Exports;
  
  use App\Member\Student;
  use Illuminate\Contracts\View\View;
  use Maatwebsite\Excel\Concerns\FromView;
  use Maatwebsite\Excel\Facades\Excel;
  
  class StudentExportView implements FromView
  {
      /**
      * @return \Illuminate\Support\Collection
      */
      public function view(): View
      {
          return view('admin.students.custom', [
             'students' =&gt; Student::take(1)-&gt;get(),
             'customs' =&gt; Student::take(1)-&gt;get(),
          ]);
      }
  }
  </code></pre>
  <p>And here is the Controller Method for downloading <code>csv</code>:</p>
  <pre><code>public function export_view()
      {
          return Excel::download(new StudentExportView, 'studentlist.csv');
      }
  </code></pre>
  <p>And here is the route that calls this method:</p>
  <p><code>Route::get('export_view','StudentAdminController@export_view')-&gt;name('students.export_view');</code></p>
  <p>But the problem is, the content that gets downloaded goes like this:</p>
  <p><a href="https://i.stack.imgur.com/uEdD6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uEdD6.png" alt="enter image description here" /></a></p>
  <p>As you can see the headings are broken and body seems to be empty.</p>
  <p>So how to solve this issue?</p>
  <hr />
  <p><strong>View:</strong></p>
  <pre><code>&lt;table class=&quot;table table-sm table-bordered&quot;&gt;
      &lt;thead&gt;
          &lt;tr class=&quot;thead-dark&quot;&gt;
              &lt;th&gt;Row&lt;/th&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Family Name&lt;/th&gt;
              &lt;th&gt;National Code&lt;/th&gt;
              &lt;th&gt;Mobile Number&lt;/th&gt;
              &lt;th&gt;Province&lt;/th&gt;
              &lt;th&gt;City&lt;/th&gt;
              &lt;th&gt;Degree&lt;/th&gt;
              &lt;th&gt;Grade&lt;/th&gt;
              &lt;th&gt;Registered Time&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
      @if($students-&gt;count() != 0)
          @foreach($students as $student)
              &lt;tr data-id=&quot;{{ $student-&gt;mbr_id }}&quot;
                  data-mobile=&quot;{{ $student-&gt;mbr_mobile }}&quot;
                  data-post-code=&quot;{{ $student-&gt;mbr_post_code }}&quot;
                  data-address=&quot;{{ $student-&gt;mbr_address }}&quot;
              &gt;
                  &lt;td&gt;{{ $student-&gt;mbr_name }}&lt;/td&gt;
                  &lt;td&gt;
                      {{ $student-&gt;mbr_family }}
                      &lt;a class=&quot;information text-danger float-left&quot;&gt;&lt;i class=&quot;fa fa-info-circle&quot;&gt;&lt;/i&gt;&lt;/a&gt;
                  &lt;/td&gt;
                  &lt;td&gt;{{ $student-&gt;mbr_national_code }}&lt;/td&gt;
                  &lt;td&gt;{{ $student-&gt;mbr_mobile }}&lt;/td&gt;
                  &lt;td&gt;{{ $student-&gt;province }}&lt;/td&gt;
                  &lt;td&gt;{{ $student-&gt;city }}&lt;/td&gt;
                  &lt;td&gt;{{ $student-&gt;degree }}&lt;/td&gt;
                  &lt;td&gt;{{ $student-&gt;grade }}&lt;/td&gt;
                  &lt;td&gt;
                  @if($customs-&gt;find($student-&gt;mbr_id))
                      {{ jdate($customs-&gt;find($student-&gt;mbr_id)-&gt;created_at) }}
                  @endif
                  &lt;/td&gt;
              &lt;/tr&gt;
          @endforeach
      @else
          &lt;tr&gt;
              &lt;td colspan=&quot;12&quot; style=&quot;text-align: center&quot;&gt;No data for showing
              &lt;/td&gt;
          &lt;/tr&gt;
      @endif
      &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>