title: Laravel 5.2 env encoding
body: <p>I use the forget password package. The settings file is \config\mail.php. Things work fine. </p>
  
  <p>But then I change the setting to .env, the characters are wrong, garbled.
  Actually, 4 Chinese characters, 2 are normal, 2 are garbled.</p>
  
  <p><strong>.env</strong></p>
  
  <pre><code>FROM_NAME=通天教主
  </code></pre>
  
  <p><strong>\config\mail.php</strong></p>
  
  <pre><code>'from' =&gt; ['address' =&gt; env('FROM_ADDRESS'), 'name' =&gt; '通天教主'], //normal
  
  'from' =&gt; ['address' =&gt; env('FROM_ADDRESS'), 'name' =&gt; env('FROM_NAME')], //garbled
  
  'from' =&gt; ['address' =&gt; env('FROM_ADDRESS'), 'name' =&gt; mb_convert_encoding(env('FROM_NAME'), "UTF-8", "Big5")], //garbled
  
  'from' =&gt; ['address' =&gt; env('FROM_ADDRESS'), 'name' =&gt; mb_convert_encoding(env('FROM_NAME'), "UTF-8", "auto")], //garbled
  </code></pre>
  
  <p>I checked with notepad++, the two files are utf8 without BOM.
  Apache server : VirtualHost: addDefaultCharset UTF-8
  PHP php.ini : default_charset = "UTF-8"</p>
  
  <p>Then I tried to echo at the bigging of \config\mail.php, detect its encodeing</p>
  
  <p><strong>\config\mail.php</strong></p>
  
  <pre><code>&lt;?php
  
  $str = env('FROM_NAME') . "\r\n";
  echo mb_detect_encoding(env('FROM_NAME'));
  
  exit;
  
  return [
  
      /*
      |--------------------------------------------------------------------------
      | Mail Driver
      ... ...
      ... ...
  </code></pre>
  
  <p>It's utf8, but also garbled.</p>
  
  <p>Is it possible that this is because of Windows + xampp? Any resolution?</p>