title: Laravel 5.0 utf8 convert?
body: <p>I am in trouble.</p>
  
  <blockquote>
    <p>windows 8.1<br>
    xampp 3.2.1<br>
    php 5.4<br>
    Laravel 5.1<br>
    Lang utf8(Japanese)</p>
  </blockquote>
  
  <p>MySql</p>
  
  <pre><code>character_set_client      utf8
  character_set_connection  utf8
  character_set_database    utf8
  character_set_filesystem  binary
  character_set_results     utf8
  character_set_server      utf8
  character_set_system      utf8
  character_sets_dir        C:\xampp\mysql\share\charsets\
  </code></pre>
  
  <p>php.ini</p>
  
  <pre><code>extension=php_mbstring.dll 
  
  mbstring.language = Japanese 
  mbstring.internal_encoding = UTF-8 
  mbstring.http_input = auto 
  mbstring.http_output = UTF-8 
  mbstring.encoding_translation = On 
  mbstring.detect_order = auto 
  mbstring.substitute_character = none; 
  mbstring.func_overload = 0 
  </code></pre>
  
  <p>insert action</p>
  
  <pre><code>public function register(Request $request) {
  $group = new Group;
  $group-&gt;name = $request-&gt;name;
  $group-&gt;remarks = $request-&gt;remarks;
  
  $validator = $this-&gt;validator($request-&gt;all());
  if ($validator-&gt;fails()) {
      $this-&gt;throwValidationException(
          $request, $validator
      );
  }
  
  $group-&gt;save();
  
  return redirect()-&gt;guest('master/group');
  }
  </code></pre>
  
  <p>view insert tag</p>
  
  <pre><code>&lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&gt; 
  </code></pre>
  
  <p>In this source code, it will be insert without problems.</p>
  
  <p>However, it is garbled when you update.</p>
  
  <p>update action</p>
  
  <pre><code>public function update(Request $request) { 
  $group = Group::find($request-&gt;id); 
  $group-&gt;name = $request-&gt;name; 
  $group-&gt;remarks = $request-&gt;remarks; 
  $group-&gt;user_id = $request-&gt;user_id; 
  
  $validator = $this-&gt;validator($request-&gt;all()); 
  if ($validator-&gt;fails()) { 
      $this-&gt;throwValidationException( 
          $request, $validator 
      ); 
  } 
  
  $group-&gt;save(); 
  
  return redirect()-&gt;guest('master/group'); 
  } 
  </code></pre>
  
  <p>I tried several.</p>
  
  <ol>
  <li><p><code>var_dump($request-&gt;name);</code> // NG</p></li>
  <li><p><code>var_dump(utf8_encode($request-&gt;name));</code> // NG</p></li>
  <li><p><code>var_dump(utf8_decode($request-&gt;name));</code> // OK</p></li>
  </ol>
  
  <p>When you update has caused the question to whether a correct code to carry out the <code>utf8_decode ()</code>. </p>
  
  <p>What, what's wrong is setting?</p>